File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Version Bump
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths-ignore :
8+ - ' **.md'
9+ - ' docs/**'
10+ - ' .github/**'
11+
12+ jobs :
13+ bump-version :
14+ runs-on : ubuntu-latest
15+
16+ # Skip if commit message contains [skip-version] or is from the bot itself
17+ if : " !contains(github.event.head_commit.message, '[skip-version]') && github.event.head_commit.author.name != 'github-actions[bot]'"
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+ with :
23+ token : ${{ secrets.GITHUB_TOKEN }}
24+ fetch-depth : 0
25+
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ' 20'
30+ cache : ' npm'
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ - name : Bump version and build
36+ run : npm run build:release
37+
38+ - name : Configure git
39+ run : |
40+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
41+ git config --local user.name "github-actions[bot]"
42+
43+ - name : Commit version bump
44+ run : |
45+ git add package.json
46+ git commit -m "chore: bump version [skip-version]" || echo "No changes to commit"
47+
48+ - name : Push changes
49+ run : git push
50+ env :
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments