Skip to content

Publish latest.json with the APK on each release - #32

Merged
lakaniemi merged 2 commits into
mainfrom
feat/app-release-latest-json
Nov 10, 2026
Merged

lakaniemi merged 2 commits into
mainfrom
feat/app-release-latest-json

Conversation

@lakaniemi

Copy link
Copy Markdown
Owner

What and why

The release workflow also attaches latest.json ({version, versionCode}, from app/version.json) next to life-app.apk. The app will fetch it from releases/latest/download/latest.json to find a newer release. PR 2 of the App updates slice (specs/app-shell.md, "App updates"); the app side comes in PRs 3 and 4.

Size

14 logic lines (10 in the workflow, 4 in check-app-version.sh), plus README and spec text.

How to review

  • app-release.yml: latest.json goes into the same gh release create as the APK. gh uploads every asset to a draft and publishes (creating the tag) last, so the file never appears before the signing check or without the APK, and a failed run still leaves no tag, so a re-run works as before.
  • check-app-version.sh: beyond the workflow change. It now requires version to be a JSON string and versionCode a number, since the regex checks let "versionCode": "2" through and the app's schema would reject it, so an update would silently never show.

Testing

  • jq '{version, versionCode}' app/version.json gives {"version":"0.0.1","versionCode":1}.
  • check-app-version.sh passes on the real file. The new type expression exits 1 on a copy with versionCode as a string.
  • actionlint passes. The workflow can't run on a branch (check requires main).
  • After merging, run app-release by hand on main. No release exists yet, so it publishes 0.0.1 with both files. Then curl -sL https://github.com/lakaniemi/life-app/releases/latest/download/latest.json should return the JSON.

🤖 Generated with Claude Code

lakaniemi and others added 2 commits November 10, 2026 18:15
The release will copy both into latest.json as they are. The regex checks
accept a versionCode written as a string, which the app's schema would
then reject, so an update would silently never show.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The app will read releases/latest/download/latest.json to find a newer
version. It goes in the same gh release create as the APK, which
publishes the release only after uploading every asset, so the file
never appears before the signing check or without the APK.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lakaniemi
lakaniemi merged commit a5e48dd into main Nov 10, 2026
1 check passed
@lakaniemi
lakaniemi deleted the feat/app-release-latest-json branch November 10, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant