Eric Bower
·
20 May 23
release.yml
1name: release to npm
2
3on:
4 release:
5 types: [published]
6
7permissions:
8 contents: read
9
10jobs:
11 release:
12 runs-on: ubuntu-latest
13 steps:
14 - name: checkout
15 uses: actions/checkout@v3
16 - name: setup deno
17 uses: denoland/setup-deno@v1
18 with:
19 deno-version: v1.x
20 - name: get version
21 id: vars
22 run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//')
23 - name: setup node
24 uses: actions/setup-node@v2
25 with:
26 node-version: 18.x
27 registry-url: https://registry.npmjs.com
28 - name: build
29 run: deno task npm $NPM_VERSION
30 env:
31 NPM_VERSION: ${{steps.vars.outputs.version}}
32 - name: publish
33 run: npm publish --access=public
34 working-directory: ./npm
35 env:
36 NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}