Skip to content

Commit 23f1d09

Browse files
committed
ci(workflow): add npm publish job to pipeline 🚀
- Add setup-node step for NPM registry configuration - Add publish-npm job to execute build and publish concurrently with Deno - Add secret NPM_TOKEN integration for automated authentication
1 parent 8f10a0a commit 23f1d09

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ on:
66
- main
77

88
jobs:
9-
publish:
9+
publish-deno:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read
1313
id-token: write
14-
1514
steps:
1615
- uses: actions/checkout@v4
1716
- uses: denoland/setup-deno@v2
@@ -26,3 +25,26 @@ jobs:
2625

2726
- name: Publish package
2827
run: deno publish --allow-dirty
28+
29+
publish-npm:
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
id-token: write
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-node@v4
37+
with:
38+
node-version: '20.x'
39+
registry-url: 'https://registry.npmjs.org'
40+
41+
- name: Install dependencies
42+
run: npm ci
43+
44+
- name: Build package
45+
run: npm run build
46+
47+
- name: Publish package
48+
run: npm publish --access public
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)