File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 20
20+ registry-url : https://registry.npmjs.org/
21+
22+ - name : Install dependencies
23+ run : npm ci
24+
25+ - name : Build project (optional)
26+ run : npm run build --if-present
27+
28+ - name : Bump version
29+ run : |
30+ git config --global user.name "github-actions[bot]"
31+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
32+ npm version patch -m "chore: bump version to %s [skip ci]"
33+ git push origin main --follow-tags
34+
35+ - name : Publish to npm
36+ run : npm publish --access public
37+ env :
38+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments