Skip to content

Commit d4d0a5b

Browse files
committed
chore(ci): npm-publish via reusable workflows (#766)
1 parent 555d4b8 commit d4d0a5b

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish package to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
concurrency:
8+
group: "${{ github.workflow }} ✨ ${{ github.ref }}"
9+
cancel-in-progress: false
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
publish:
16+
name: Publish to npm
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
id-token: write
21+
steps:
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23+
with:
24+
persist-credentials: false
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
28+
with:
29+
node-version: "lts/*"
30+
registry-url: "https://registry.npmjs.org"
31+
32+
# npm stage publish requires npm >= 11.15.0
33+
- name: Upgrade npm
34+
run: npm install -g npm@latest
35+
36+
- name: Stage publish to npm
37+
run: npm stage publish

0 commit comments

Comments
 (0)