ci: Promote snapcraft from CI

This commit is contained in:
krille-chan 2023-12-24 08:34:06 +01:00
parent 709e8c61af
commit 9e93a4f4e1
No known key found for this signature in database

View file

@ -168,3 +168,24 @@ jobs:
bundle exec fastlane deploy_release
fi
cd ..
promote_snapcraft:
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- run: snapcraft
- name: Promote Snap
env: # Workaround for https://github.com/snapcore/snapcraft/issues/4439
SNAPCRAFT_HAS_TTY: "true"
run: |
RELEASE_TYPE=$(echo "${{ github.ref }}" | awk -F"/" '{print $3}')
if [ "$RELEASE_TYPE" = "rc" ]; then
yes | snapcraft promote fluffychat --from-channel edge --to-channel candidate
else
yes | snapcraft promote fluffychat --from-channel edge --to-channel stable
fi