Make workflow if expressions multi line
To make them easier to read
This commit is contained in:
32
.github/workflows/deploy.yml
vendored
32
.github/workflows/deploy.yml
vendored
@@ -15,7 +15,9 @@ jobs:
|
|||||||
GITREV=$(git rev-parse --short HEAD)
|
GITREV=$(git rev-parse --short HEAD)
|
||||||
echo $GITREV
|
echo $GITREV
|
||||||
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
|
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
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
# Needs to be explicitly specified for auth to work
|
# Needs to be explicitly specified for auth to work
|
||||||
@@ -28,15 +30,21 @@ jobs:
|
|||||||
- run: npm publish --access public
|
- run: npm publish --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
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
|
- run: npm publish --access public --tag beta
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
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
|
- run: npm publish --access public --tag dev
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
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:
|
snap:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -45,7 +53,9 @@ jobs:
|
|||||||
GITREV=$(git rev-parse --short HEAD)
|
GITREV=$(git rev-parse --short HEAD)
|
||||||
echo $GITREV
|
echo $GITREV
|
||||||
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
|
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: |
|
- run: |
|
||||||
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
|
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
|
||||||
echo $VERSION
|
echo $VERSION
|
||||||
@@ -61,16 +71,22 @@ jobs:
|
|||||||
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
snap: ${{ steps.snapcraft.outputs.snap }}
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
release: stable
|
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
|
- uses: snapcore/action-publish@v1
|
||||||
with:
|
with:
|
||||||
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
snap: ${{ steps.snapcraft.outputs.snap }}
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
release: beta
|
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
|
- uses: snapcore/action-publish@v1
|
||||||
with:
|
with:
|
||||||
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
store_login: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
snap: ${{ steps.snapcraft.outputs.snap }}
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
release: edge
|
release: edge
|
||||||
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }}
|
if: |
|
||||||
|
github.event_name == 'push' &&
|
||||||
|
github.event.ref == 'refs/heads/master'
|
||||||
|
|||||||
Reference in New Issue
Block a user