Skip to content

Commit 013d204

Browse files
committed
CI: move tag to version-bumped commit after stamping manifest
The tag was created before CI stamps the version, so raw.githubusercontent.com served the old AndroidManifest.xml for the tag ref. Now CI force-moves the tag to the commit that includes the version bump.
1 parent 13d77bc commit 013d204

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/build-apk.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ jobs:
6969
git commit -m "Bump version to ${GITHUB_REF_NAME#v}"
7070
git push origin HEAD:main
7171
fi
72+
- name: Move tag to version-bumped commit
73+
if: startsWith(github.ref, 'refs/tags/')
74+
shell: bash
75+
run: |
76+
set -euo pipefail
77+
# After committing the version bump to main, the tag still points
78+
# to the pre-bump commit. Move it so raw.githubusercontent.com
79+
# serves the correct AndroidManifest.xml for this tag.
80+
BUMP_SHA="$(git rev-parse HEAD)"
81+
git tag -f "${GITHUB_REF_NAME}" "${BUMP_SHA}"
82+
git push origin "${GITHUB_REF_NAME}" --force
83+
7284
7385
- name: Configure release signing
7486
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)