File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish NPM Package
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ publish :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ' 18'
22+ registry-url : ' https://registry.npmjs.org'
23+
24+ - name : Setup pnpm
25+ uses : pnpm/action-setup@v4
26+ with :
27+ version : 8
28+
29+ - name : Install dependencies
30+ working-directory : ./ui/ModelModal
31+ run : pnpm install
32+
33+ - name : Build package
34+ working-directory : ./ui/ModelModal
35+ run : pnpm build
36+
37+ - name : Update package version from tag
38+ working-directory : ./ui/ModelModal
39+ run : |
40+ TAG_VERSION=${GITHUB_REF#refs/tags/v}
41+ npm version $TAG_VERSION --no-git-tag-version
42+
43+ - name : Publish to NPM Registry
44+ working-directory : ./ui/ModelModal
45+ run : pnpm publish --no-git-checks
46+ env :
47+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments