From ef5db94a893ea3b0642c0f88ecb67011df8b7026 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 3 Jul 2020 16:00:04 +0200 Subject: [PATCH] Publish pre-releases to beta channels Extra important for NPM which doesn't allow replacing a release once it is published. --- .github/workflows/deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 75a566bd..b65ade9f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,11 @@ jobs: - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ !github.event.release.prerelease }} + - run: npm publish --access public --tag beta + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ github.event.release.prerelease }} snap: runs-on: ubuntu-latest container: snapcore/snapcraft @@ -36,3 +41,6 @@ jobs: env: SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}} - run: snapcraft push --release=stable *.snap + if: ${{ !github.event.release.prerelease }} + - run: snapcraft push --release=beta *.snap + if: ${{ github.event.release.prerelease }}