Skip to content

Commit b09ccd1

Browse files
committed
Add version tracking and GitHub Action for auto-increment
1 parent 62195bf commit b09ccd1

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/version.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bump Version
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'skills/**'
8+
9+
jobs:
10+
bump:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
17+
- name: Bump version
18+
run: |
19+
current=$(cat version.txt)
20+
next=$((current + 1))
21+
echo $next > version.txt
22+
echo "Bumped version from $current to $next"
23+
24+
- name: Commit and push
25+
run: |
26+
git config user.name "github-actions[bot]"
27+
git config user.email "github-actions[bot]@users.noreply.github.com"
28+
git add version.txt
29+
git commit -m "v$(cat version.txt)"
30+
git push

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

0 commit comments

Comments
 (0)