-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.03 KB
/
publish-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
38
39
40
41
name: NPM publish
on:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
# environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Enable Corepack
run: corepack enable
- name: Set Yarn version
run: yarn set version 4.5.0
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Publish to NPM
run: npm publish --provenance --access public
# run: yarn npm publish --access public
# Note: At this time, yarn is not a supported tool for publishing your packages with provenance.
# https://docs.npmjs.com/generating-provenance-statements#using-third-party-package-publishing-tools
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}