]> git.proxmox.com Git - mirror_novnc.git/blob - .github/workflows/deploy.yml
Publish pre-releases to beta channels
[mirror_novnc.git] / .github / workflows / deploy.yml
1 name: Publish
2
3 on:
4 release:
5 types: [published]
6
7 jobs:
8 npm:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v2
12 - uses: actions/setup-node@v1
13 - run: npm install
14 - run: npm publish --access public
15 env:
16 NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
17 if: ${{ !github.event.release.prerelease }}
18 - run: npm publish --access public --tag beta
19 env:
20 NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
21 if: ${{ github.event.release.prerelease }}
22 snap:
23 runs-on: ubuntu-latest
24 container: snapcore/snapcraft
25 steps:
26 - uses: actions/checkout@v2
27 - uses: actions/setup-node@v1
28 - run: npm install
29 - run: ./utils/use_require.js --clean --as commonjs --with-app
30 - run: |
31 cp utils/launch.sh build/launch.sh
32 cp snap/local/svc_wrapper.sh build/svc_wrapper.sh
33 - run: |
34 VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
35 echo $VERSION
36 sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml
37 - run: snapcraft
38 - run: |
39 mkdir .snapcraft
40 echo ${SNAPCRAFT_LOGIN} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
41 env:
42 SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}}
43 - run: snapcraft push --release=stable *.snap
44 if: ${{ !github.event.release.prerelease }}
45 - run: snapcraft push --release=beta *.snap
46 if: ${{ github.event.release.prerelease }}