Skip to content

Commit 5bc6200

Browse files
author
Erik Rasmussen
committed
ci: add npm publish workflow on GitHub release
1 parent 890df94 commit 5bc6200

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)