Seven "TurnProxy-apk" artifacts from July 4th (defaulted to 90-day
retention, see the build-apk.yml fix) were still consuming ~261 MB of
the account's shared 0.5 GB Actions storage quota, and manually
deleting them one at a time isn't practical from here. This workflow
does nothing but the cleanup itself -- no checkout, no Gradle, no APK
build -- so it can be run on demand (workflow_dispatch) purely to free
storage: for every branch this repo has ever built from, it keeps only
the most recent run's artifacts and deletes every other run's, the
same policy already in place on the GeneralsZH-Android-Port workflow.
Best-effort per delete (a failure there must not fail the job).
No retention-days was set, so every build artifact defaulted to
GitHub's 90-day maximum. That's most of why several old builds (July
4th) were still consuming the account's shared 0.5 GB Actions storage
quota two weeks later. 7 days is still ample time to grab a build from
the Actions page.
Building on every push was wasteful and mixed two different concerns
(a disposable build artifact vs. a published release). Both are now
workflow_dispatch-only (a button in the Actions tab, no more
automatic runs on push/tag):
- build-apk.yml: builds the APK and uploads it as a run artifact.
- release.yml: builds the APK and publishes it as a GitHub Release
for a given tag.
Pushing a git tag from this session is blocked (tag refs are
disallowed by the session's git proxy), so add a release_tag input
to workflow_dispatch: when set, the run publishes/creates that tag's
GitHub Release the same way a real tag push would, using the
workflow's own GITHUB_TOKEN instead of a session git push.
Actions artifacts expire and aren't a stable download link. Add a tag
trigger (v*) that, after the build, publishes a GitHub Release with
the signed APKs attached via softprops/action-gh-release, using the
repo's default GITHUB_TOKEN.
Bump versionCode/versionName to 9/2.0.2 for the first tagged release.
Adds a workflow that builds and uploads a release APK on every push
to main/this branch. Signing uses a static test keystore committed
to the repo (app/ci-release.keystore.jks) instead of the default
auto-generated debug key, so the signature stays identical across
builds/runners and users can update the app without a reinstall.
This keystore is for CI/testing only, not Google Play distribution.