Move CI to Gitea: run-number offset, Cloudflare-only publishing

- plgVersionRunOffset=1000: stamped build number is run number + offset, so
  Gitea's restarted run counter cannot produce a versionCode below an
  installed one (GitHub reached prod 30, dev ~172). Tags and versionName use
  the same number.
- Drop the GitHub release steps; plg.wallacenet.ca is the only channel.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdMNbY5hLR7FjtfEE712xG
This commit is contained in:
Claude
2026-10-14 17:00:01 +00:00
parent 4c603f6d3d
commit ad30ab9dea
6 changed files with 45 additions and 52 deletions
+6 -22
View File
@@ -108,7 +108,10 @@ jobs:
# it cannot name different versions.
series="$(sed -n 's/^plgVersionSeries=//p' gradle.properties)"
test -n "$series"
version="v${series}.${{ github.run_number }}-dev"
offset="$(sed -n 's/^plgVersionRunOffset=//p' gradle.properties)"
test -n "$offset"
# Same arithmetic as build.gradle.kts, so the tag names the APK's own number.
version="v${series}.$(( ${{ github.run_number }} + offset ))-dev"
src="app/build/outputs/apk/debug/app-debug.apk"
dest="ProLibertateGames-${version}.apk"
cp "$src" "$dest"
@@ -124,27 +127,8 @@ jobs:
if-no-files-found: error
retention-days: 1
- name: Publish dev channel prerelease
if: github.ref == 'refs/heads/dev'
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
gh release create "${{ steps.stage.outputs.version }}" \
"${{ steps.stage.outputs.apk }}" \
--repo "${{ github.repository }}" \
--target "${{ github.sha }}" \
--title "ProLibertateGames ${{ steps.stage.outputs.version }}" \
--prerelease \
--notes "Automated **dev channel** build from \`${{ github.sha }}\` on \`dev\`.
Preview build: newer than production, and less tested. Switch to the
Dev update channel in Settings to be offered these. Marked as a
prerelease so production-channel installs never see it."
# Publishes the build to https://plg.wallacenet.ca (Cloudflare Pages). Runs
# alongside the GitHub release above for one deployment so already-installed
# apps, which still read GitHub, can fetch the updater that reads Cloudflare.
# Publishes the build to https://plg.wallacenet.ca (Cloudflare Pages), which is
# the only release channel: the in-app updater reads latest.json from there.
#
# Both workflows deploy into one Pages site, and a deploy replaces the whole
# site, so they share a concurrency group and never run at the same time.