-
Notifications
You must be signed in to change notification settings - Fork 24
37 lines (34 loc) · 879 Bytes
/
Copy pathpublish.yml
File metadata and controls
37 lines (34 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up pnpm
uses: pnpm/action-setup@v5
with:
version: 10
cache: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Build
run: pnpm run build
- name: Publish to NPM (with provenance)
run: |
npm i -g npm
pnpm publish --no-git-checks --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}