-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Icon generation flow was fixed [no ci].
- Loading branch information
Showing
1 changed file
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" |