Skip to content

Commit 0d7dc4c

Browse files
committed
ci: add publish workflow
1 parent 69f4755 commit 0d7dc4c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Set node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: lts/*
26+
cache: pnpm
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- run: npx changelogithub
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Install Dependencies
34+
run: pnpm i --no-frozen-lockfile
35+
36+
- name: PNPM build
37+
run: pnpm run build
38+
39+
- name: Publish to NPM
40+
run: pnpm -r publish --access public --no-git-checks
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)