-
-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (39 loc) · 936 Bytes
/
publish-npm.yml
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
38
39
40
name: Publish [NPM]
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
node: ["lts/*"]
steps:
- name: 🧱 Checkout repository
uses: actions/checkout@v4
- name: 🔩 Setup PNPM
uses: pnpm/action-setup@v3
with:
version: next-9
standalone: true
- name: 🔩 Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: 🚀 Install dependencies
run: pnpm install
- name: 🚀 Build package
run: pnpm build
- name: 🚀 Test package
run: pnpm test
- name: 🚀 Publish package
run: pnpm publish --access public --no-git-checks --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}