Skip to content

Commit 4c2b330

Browse files
committed
fix(workflow): automated versioning for version and versionCode
1 parent 5c5acc8 commit 4c2b330

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/release-please-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"release-type": "simple",
66
"changelog-path": "CHANGELOG.md",
77
"extra-files": [
8-
{ "type": "generic", "path": "version.txt" }
8+
{ "type": "generic", "path": "Assets/version.txt" }
99
]
1010
}
1111
}

.github/workflows/release-pr-versioncode.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ jobs:
4242
CODE=$((MAJOR*10000 + MINOR*100 + PATCH))
4343
echo "Computed versionCode: $CODE"
4444
45-
echo $CODE > versionCode.txt
45+
# Write into Assets/ (not repo root)
46+
echo $CODE > Assets/versionCode.txt
4647
4748
git config user.name "github-actions[bot]"
4849
git config user.email "github-actions[bot]@users.noreply.github.com"
49-
git add versionCode.txt
50+
git add Assets/versionCode.txt
5051
git commit -m "chore(android): set versionCode $CODE for $VER" || echo "No changes to commit"
5152
git push

0 commit comments

Comments
 (0)