Skip to content

Commit ad63581

Browse files
committed
chore(cd): added actions for npm release
1 parent 0e99669 commit ad63581

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Diff for: .github/workflows/npm-release.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release new versions
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
publish-lib:
14+
name: Publish @papra/lecture to npm
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
id-token: write
19+
20+
steps:
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22+
- run: corepack enable
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: 'pnpm'
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- name: Install dependencies
30+
run: pnpm i
31+
working-directory: ./
32+
33+
- name: Publish to npm
34+
run: pnpm publish --access public --no-git-checks
35+
env:
36+
NPM_CONFIG_PROVENANCE: true
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)