File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to NPM
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v4
13+ with :
14+ node-version : 20
15+ - name : Clean install
16+ run : |
17+ rm -rf node_modules package-lock.json
18+ npm install
19+ - name : Run build
20+ run : npm run build
21+ - uses : actions/upload-artifact@v4
22+ with :
23+ name : build-artifacts
24+ path : dist
25+
26+ publish-npm :
27+ needs : build
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v4
31+ - uses : actions/setup-node@v4
32+ with :
33+ node-version : 20
34+ registry-url : https://registry.npmjs.org/
35+ - uses : actions/download-artifact@v4
36+ with :
37+ name : build-artifacts
38+ path : dist
39+ - name : Publish to npm
40+ run : npm publish
41+ env :
42+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments