From 03680e41b37e9062adfabd59fb4687b9d1e92665 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Sat, 24 Feb 2024 12:58:19 +0100 Subject: [PATCH] ci: use a PAT token to trigger the snap release (#52) --- .github/workflows/release-packaging.yml | 2 +- .github/workflows/snapcraft-build.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-packaging.yml b/.github/workflows/release-packaging.yml index fb16745..91c7fd3 100644 --- a/.github/workflows/release-packaging.yml +++ b/.github/workflows/release-packaging.yml @@ -125,4 +125,4 @@ jobs: run: just ci-publish env: BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} diff --git a/.github/workflows/snapcraft-build.yaml b/.github/workflows/snapcraft-build.yaml index e1e34bf..6944a0d 100644 --- a/.github/workflows/snapcraft-build.yaml +++ b/.github/workflows/snapcraft-build.yaml @@ -9,7 +9,7 @@ on: pull_request: # Build and publish on release release: - types: [created] + types: [published] jobs: build: @@ -31,7 +31,7 @@ jobs: # Push, on each release, to the stable channel - uses: snapcore/action-publish@v1 - if: ${{ env.GITHUB_EVENT_NAME == 'release' }} + if: ${{ env.GITHUB_EVENT_NAME == 'release' || (env.GITHUB_EVENT_NAME == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/')) }} env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} with: