Merge pull request #747 from krille-chan/krille/promote-snapcraft

ci: Promote snapcraft from CI
This commit is contained in:
Krille-chan 2023-12-24 08:43:55 +01:00 committed by GitHub
commit 4b8c94f4a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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