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 npm package
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v3
20+ with :
21+ node-version : ' 16'
22+ registry-url : https://registry.npmjs.org/
23+ scope : ' @wonderium'
24+
25+ - name : Install dependencies
26+ run : npm install
27+
28+ - name : Apply settings
29+ run : |
30+ git config user.name github-actions
31+ git config user.email [email protected] 32+ npm version ${{ github.event.inputs.version }}
33+ git push origin main
34+ git push origin v${{ github.event.inputs.version }}
35+
36+ - name : Create build
37+ run : npm run build
38+
39+ - name : Publish package
40+ run : npm publish --access public
41+ env :
42+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments