Skip to content

Commit 9f321e6

Browse files
committed
ci: automate new release
1 parent 291ee08 commit 9f321e6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: NPM Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
version: 9
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: 'pnpm'
25+
registry-url: https://registry.npmjs.org/
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
- name: Lint code base
29+
run: pnpm test
30+
- name: Publish package
31+
run: pnpm publish --provenance --access public --no-git-checks
32+
env:
33+
NPM_CONFIG_PROVENANCE: true
34+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 commit comments

Comments
 (0)