Skip to content

Commit fa17c3f

Browse files
authored
Add GitHub Actions workflow to publish to NPM (#74)
1 parent b2cb4de commit fa17c3f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to NPM
2+
3+
on:
4+
# use release trigger
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '18'
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install dependencies with yarn
21+
run: yarn install
22+
23+
- name: Install dependencies with npm
24+
run: npm install
25+
26+
- name: Build
27+
run: yarn build
28+
29+
- name: Publish to NPM
30+
run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)