diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:20:41 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:20:41 +0100 |
commit | bbbcab692acd2e4761154866053fb6b24e7d48b9 (patch) | |
tree | d12a89121a93d9ee5a0bdb39149acc935a7f65d8 | |
parent | 8c09b99b4e61b138c85ef108b23e208c480ad21e (diff) | |
download | novnc-bbbcab692acd2e4761154866053fb6b24e7d48b9.tar.gz |
Make workflow if expressions multi line
To make them easier to read
-rw-r--r-- | .github/workflows/deploy.yml | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4f17a67..6a8f760 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,9 @@ jobs: GITREV=$(git rev-parse --short HEAD) echo $GITREV sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + if: | + github.event_name == 'push' && + github.event.ref == 'refs/heads/master' - uses: actions/setup-node@v1 with: # Needs to be explicitly specified for auth to work @@ -28,15 +30,21 @@ jobs: - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ github.event_name == 'release' && !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_name == 'release' && github.event.release.prerelease }} + if: | + github.event_name == 'release' && + github.event.release.prerelease - run: npm publish --access public --tag dev env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + if: | + github.event_name == 'push' && + github.event.ref == 'refs/heads/master' snap: runs-on: ubuntu-latest steps: @@ -45,7 +53,9 @@ jobs: GITREV=$(git rev-parse --short HEAD) echo $GITREV sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + if: | + github.event_name == 'push' && + github.event.ref == 'refs/heads/master' - run: | VERSION=$(grep '"version"' package.json | cut -d '"' -f 4) echo $VERSION @@ -61,16 +71,22 @@ jobs: store_login: ${{ secrets.SNAPCRAFT_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} release: stable - if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} + if: | + github.event_name == 'release' && + !github.event.release.prerelease - uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.SNAPCRAFT_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} release: beta - if: ${{ github.event_name == 'release' && github.event.release.prerelease }} + if: | + github.event_name == 'release' && + github.event.release.prerelease - uses: snapcore/action-publish@v1 with: store_login: ${{ secrets.SNAPCRAFT_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} release: edge - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + if: | + github.event_name == 'push' && + github.event.ref == 'refs/heads/master' |