Skip to content

Commit

Permalink
build: Icon generation flow was fixed [no ci].
Browse files Browse the repository at this point in the history
  • Loading branch information
malilex committed Mar 25, 2024
1 parent 4046c34 commit 7310e74
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions .github/workflows/publish-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,54 @@ jobs:
PATCH=`cat $PROPS | grep "versionPatch" | cut -d'=' -f2`
VER=$MAJOR.$MINOR.$PATCH
echo $VER
echo "release_name=$VER" >> $GITHUB_OUTPUT
echo "minor_version=$MINOR" >> $GITHUB_OUTPUT
echo "tag=sdds-icons-v$VER" >> $GITHUB_OUTPUT
- name: Retrieve tag exists flag
uses: mukunku/[email protected]
id: checkTag
with:
tag: ${{steps.extract_version.outputs.tag}}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Verify tag not exists
run: |
if [ ${{ steps.checkTag.outputs.exists }} == true ]; then exit 1; else exit 0; fi
- name: Verify release branch not exists
working-directory: ./current
shell: bash
run: |
git fetch --all
if git branch -a | grep -q release/${{ steps.extract_version.outputs.tag }}; then exit 1; else exit 0; fi
- name: Create release branch
working-directory: ./current
shell: bash
run: |
git fetch --all
git branch
git checkout -b release/icons-v${{steps.extract_version.outputs.release_name}} develop
git checkout -b release/${{steps.extract_version.outputs.tag}} develop
- name: Create drawables folder
working-directory: ./current
continue-on-error: true
run: mkdir -p ./sdds-core/icons/src/main/res/drawable

- 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
run: cp -rf plasma/packages/plasma-icons/android-icons/. current/sdds-core/icons/src/main/res/drawable/

- name: Create tag and release pull request
working-directory: ./current
shell: bash
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
TAG=icons-v${{steps.extract_version.outputs.release_name}}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
TAG=${{steps.extract_version.outputs.tag}}
git config --local user.email "salutedevs@gmail.com"
git config --local user.name "Salute Android Team"
git add ./sdds-core/icons/
git commit -m "feat(sdds-acore/icons): New icons were added"
git tag -a $TAG -m "Release $TAG"
git push --set-upstream origin release/$TAG
git push origin $TAG
gh pr create --base develop --head release/$TAG
gh pr create --base main --head release/$TAG --title "Release $TAG" --body "Icons were updated"

0 comments on commit 7310e74

Please sign in to comment.