Skip to content

Commit 7656dad

Browse files
author
DevForge Engineer
committed
ci: add npm publish workflow for datamorph-cli package
1 parent 14be8f5 commit 7656dad

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
environment: npm
12+
permissions:
13+
contents: read
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
18+
with:
19+
persist-credentials: false
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
23+
with:
24+
node-version: "22"
25+
registry-url: "https://registry.npmjs.org"
26+
27+
- name: Install dependencies
28+
run: npm ci || npm install
29+
30+
- name: Publish to npm
31+
run: npm publish --access public
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)