Skip to content

Commit f3bab73

Browse files
committed
ci: add job for npm publish
1 parent 002381e commit f3bab73

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/publish-latest.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish (latest)
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
publish:
12+
if: "!github.event.release.prerelease"
13+
runs-on: ubuntu-latest
14+
environment: npm
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version-file: ".node-version"
21+
registry-url: "https://registry.npmjs.org"
22+
cache: "npm"
23+
- run: npm ci
24+
- run: npm run build
25+
- run: npm publish --provenance --tag=latest
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.17.1

0 commit comments

Comments
 (0)