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 : Bump version
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Semver type of new version (major / minor / patch)'
8+ required : true
9+ type : choice
10+ options :
11+ - patch
12+ - minor
13+ - major
14+ - prerelease --preid=beta
15+ - prerelease --preid=rc
16+
17+ permissions :
18+ contents : write
19+
20+ jobs :
21+ bump-version :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Check out source
25+ uses : actions/checkout@v4
26+ with :
27+ token : ${{ secrets.GITHUB_TOKEN }}
28+
29+ - name : Setup Node.js
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version-file : ' .nvmrc'
33+
34+ - name : Setup Git
35+ run : |
36+ git config user.name 'github-actions[bot]'
37+ git config user.email 'github-actions[bot]@users.noreply.github.com'
38+
39+ - name : Bump version
40+ run : npm version ${{ github.event.inputs.version }}
41+
42+ - name : Push latest version
43+ run : git push origin main --follow-tags
You can’t perform that action at this time.
0 commit comments