Automatically release latest snap when building a tag

This commit is contained in:
Safihre
2022-01-08 10:03:09 +01:00
parent 4d237c4328
commit 94de00b14c
2 changed files with 87 additions and 1 deletions

View File

@@ -141,4 +141,22 @@ jobs:
name: macOS binary (not notarized)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python3 builder/package.py release
run: python3 builder/package.py release
release_snap:
name: Release Snap
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Release latest available Snap
run: |
sudo snap install snapcraft --classic
echo "${SNAP_TOKEN}" | snapcraft login --with -
python3 snap/local/release_snap.py