-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (31 loc) · 1.09 KB
/
release.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
name: Release
on:
release:
types:
- published
jobs:
release:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Publishing to npmjs registry
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
# registry-url is required to correctly setup authentication per https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install NPM dependencies
run: npm ci
- name: Check build
run: npm run build
- name: Publish to npmjs
run: npm publish
env:
# To create a new token, go to https://www.npmjs.com/settings/<user>/tokens/, generate a "Granular Access Token" scoped to @cloudflare/privacypass-ts, and update NPM_TOKEN GitHub secret
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}