Skip to content

Commit 26236ab

Browse files
authored
ci: npm publish workflow (#8)
1 parent 6068954 commit 26236ab

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publishing.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [ published ]
5+
6+
jobs:
7+
publish:
8+
name: Publish latest release
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
strategy:
14+
matrix:
15+
node: [22.x]
16+
steps:
17+
- uses: actions/checkout@v5
18+
- name: Setup Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v5
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: npm
23+
registry-url: 'https://registry.npmjs.org'
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Build package
27+
run: npm run build
28+
- name: Publish package
29+
run: npm publish --provenance --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)