Skip to content

Commit

Permalink
feat(sdds-acore/icons): Icons publication workflow was implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
malilex committed Mar 19, 2024
1 parent fdf3be5 commit 983cd70
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/publish-icons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Publish Icons

#on:
# repository_dispatch:
# types: [ plasma-released ]

on:
pull_request:
branches:
- develop

jobs:
icons:
runs-on: ubuntu-latest

steps:
# делаем сheckout в текущем репозитория
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
path: current

# делаем сheckout репозитория plasma
- name: Checkout to Plasma Web
uses: actions/checkout@v4
with:
repository: salute-developers/plasma
ref: master
show-progress: false
path: plasma

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: 'plasma/.nvmrc'

- name: Install plasma web project deps
run: |
cd plasma
npm ci
- name: Generate android icons
run: |
cd plasma
npx lerna bootstrap --scope="@salutejs/plasma-icons" --ignore-scripts
npm run generate:android --prefix="packages/plasma-icons"
- name: Move generated icons to drawable folder
run: |
cp -r plasma/packages/plasma-icons/android-icons/. current/sdds-core/icons/src/main/res/drawable/
ls current/android-icons
- name: Extract branch name
id: extract_branch
working-directory: ./current
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- name: Build icon Package
working-directory: ./current
run : |
./gradlew :sdds-core:icons:assembleDebug -PbranchName=${{ steps.extract_branch.outputs.branch }}
- name: Upload icons
uses: actions/upload-artifact@v2
with:
name: sdds-icons
path: current/sdds-core/icons/build/outputs/aar/*.aar
10 changes: 10 additions & 0 deletions sdds-core/icons/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
id("convention.android-lib")
id("convention.maven-publish")
}

group = "sdds-core"

android {
namespace = "com.sdds.icons"
}
6 changes: 6 additions & 0 deletions sdds-core/icons/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nexus.artifactId=sdds-icons
nexus.snapshot=false
nexus.description=SDDS icon pack library
versionMajor=0
versionMinor=1
versionPatch=0
2 changes: 2 additions & 0 deletions sdds-core/icons/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />
1 change: 1 addition & 0 deletions sdds-core/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rootProject.name = "sdds-core"

includeBuild("../build-system")
include(
":icons",
":plugin_theme_builder",
":uikit",
":uikit-compose"
Expand Down

0 comments on commit 983cd70

Please sign in to comment.