-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 905 Bytes
/
publish.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
41
42
name: Publish to npm
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Run tests
run: pnpm test
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}
provenance: true
access: public
- if: ${{ steps.publish.outputs.type }}
run: echo "Published ${{ steps.publish.outputs.id }}"