Skip to content

Commit d3b90ff

Browse files
felixindrawanFelix-Dynamsoft
authored andcommitted
feat: add npm publish github action
1 parent 2ac85a1 commit d3b90ff

File tree

2 files changed

+34
-47
lines changed

2 files changed

+34
-47
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
# Optionally enable manual workflow runs
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '18'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
# - name: Run tests
26+
# run: npm test
27+
28+
- name: Build package
29+
run: npm run build
30+
31+
- name: Publish to npm
32+
run: npm publish
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PAT }}

0 commit comments

Comments
 (0)