Repository navigation
Publish latest.json with the APK on each release - #32
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The release workflow also attaches
latest.json({version, versionCode}, fromapp/version.json) next tolife-app.apk. The app will fetch it fromreleases/latest/download/latest.jsonto 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.jsongoes into the samegh release createas the APK.ghuploads 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 requiresversionto be a JSON string andversionCodea 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.jsongives{"version":"0.0.1","versionCode":1}.check-app-version.shpasses on the real file. The new type expression exits 1 on a copy withversionCodeas a string.actionlintpasses. The workflow can't run on a branch (checkrequiresmain).app-releaseby hand onmain. No release exists yet, so it publishes 0.0.1 with both files. Thencurl -sL https://github.com/lakaniemi/life-app/releases/latest/download/latest.jsonshould return the JSON.🤖 Generated with Claude Code