Skip to content

Commit a71f576

Browse files
committed
Add npm GitHub Action to publish
1 parent af0f301 commit a71f576

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/npm.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: npm
2+
3+
env:
4+
DENO_VERSION: 1.x
5+
NODE_VERSION: 16.x
6+
7+
on:
8+
push:
9+
tags:
10+
- 'v*'
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- uses: denoland/setup-deno@main
20+
with:
21+
deno-version: ${{ env.DENO_VERSION }}
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ env.NODE_VERSION }}
25+
registry-url: 'https://registry.npmjs.org'
26+
- name: Build
27+
run: make build-npm
28+
- name: Publish
29+
run: |
30+
cd npm
31+
npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)