Skip to content

Commit aa3efbb

Browse files
Added version.json + Updated workflow for auto-increment of version.
1 parent ac19706 commit aa3efbb

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,33 @@ jobs:
1515
with:
1616
submodules: 'recursive'
1717

18-
- name: '🔒 Verify Secrets Exist'
18+
- name: '� Setup Node.js for Version Bump'
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20.x
22+
cache: 'npm'
23+
24+
- name: '🧩 Install semver dependency'
25+
run: npm install semver
26+
27+
- name: '🔄 Auto-bump version (main only)'
28+
if: github.ref == 'refs/heads/main'
29+
run: node scripts/bumpVersion.js
30+
31+
- name: '🔧 Configure Git for Automation'
32+
if: github.ref == 'refs/heads/main'
33+
run: |
34+
git config --global user.name "GitHub Actions"
35+
git config --global user.email "actions@github.com"
36+
37+
- name: '💾 Commit Version Update'
38+
if: github.ref == 'refs/heads/main'
39+
run: |
40+
git add version.json package.json
41+
git commit -m "chore: Auto-increment version [skip ci]" || echo "No changes to commit"
42+
git push
43+
44+
- name: '�🔒 Verify Secrets Exist'
1945
run: |
2046
if [ -z "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" ]; then
2147
echo "❌ Critical error: GOOGLE_SERVICES_JSON_BASE64 secret missing!"

version.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "1.0.0"
3+
}

0 commit comments

Comments
 (0)