Skip to content

Commit a59073e

Browse files
committed
workflow for npm publish
Will be auto-triggered on push/merge to master
1 parent 1f4c2c6 commit a59073e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/deploy-npm.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: Build, Test and Publish npm
6+
jobs:
7+
publish:
8+
name: Publish npm
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Use Node.js ${{ matrix.node-version }}
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: '20.x'
16+
always-auth: true
17+
- name: Install Yarn
18+
run: npm install -g yarn
19+
- name: Install dependencies
20+
run: yarn
21+
- name: Build
22+
run: yarn build
23+
- name: Test
24+
run: yarn test
25+
- name: Publish
26+
env:
27+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
28+
run: yarn publish --access public

0 commit comments

Comments
 (0)