-
-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 874 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
name: Publish to NPM
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
chrome-tests:
uses: ./.github/workflows/tests.yml
publish:
needs: [chrome-tests]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
- name: Build
run: pnpm build
- name: Pack
run: rm -f *.tgz && npm pack
- name: Publish
run: npm publish *.tgz --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}