Skip to content

Commit bb59b78

Browse files
authored
Update GitHub Actions workflow for npm publishing
1 parent 17a1118 commit bb59b78

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
1-
---
2-
name: "🚀 publish"
1+
name: 🚀 Publish
32

43
on:
54
release:
6-
types: [created]
5+
types:
6+
- published
77

88
jobs:
99
publish-npm:
1010
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
1115
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
1421
with:
15-
node-version: 12
22+
node-version: 22
1623
registry-url: https://registry.npmjs.org/
17-
- run: npm publish
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
# Uncomment if your package needs to be built.
29+
# - name: Build
30+
# run: npm run build
31+
32+
- name: Publish to npm
33+
run: npm publish
1834
env:
19-
NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)