From 76aa3d1256a86924925ecc3cf282a5f5f022a1ee Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 30 Dec 2020 13:40:03 +0100 Subject: [PATCH] Run NPM and snap builds on every push To make sure these things still build. That means we need to make the actual deploy parts optional. --- .github/workflows/deploy.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 454ff8bd..781309bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,8 @@ name: Publish on: + push: + pull_request: release: types: [published] @@ -17,11 +19,11 @@ jobs: - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ !github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - run: npm publish --access public --tag beta env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && github.event.release.prerelease }} snap: runs-on: ubuntu-latest container: snapcore/snapcraft @@ -43,7 +45,8 @@ jobs: echo ${SNAPCRAFT_LOGIN} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg env: SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}} + if: ${{ github.event_name == 'release' }} - run: snapcraft push --release=stable *.snap - if: ${{ !github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - run: snapcraft push --release=beta *.snap - if: ${{ github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && github.event.release.prerelease }}