Skip to content

ci(android): use annotated tag message as Play Store release notes#5

Merged
vinny2020 merged 1 commit intomainfrom
feat/android-release-notes-from-tag
May 4, 2026
Merged

ci(android): use annotated tag message as Play Store release notes#5
vinny2020 merged 1 commit intomainfrom
feat/android-release-notes-from-tag

Conversation

@vinny2020
Copy link
Copy Markdown
Owner

Summary

Currently every Android release ships with whatever's in the static app/src/main/play/release-notes/en-US/internal.txt file. Customizing per release means editing, committing, then tagging — three steps for what should be one.

This change makes the release flow one CLI command:

git tag -a android/v1.7.0-production -m "What you want users to see in Play Store"
git push origin android/v1.7.0-production

CI extracts the tag's annotation message and writes it to the per-track release-notes file before publishReleaseBundle runs.

How it works

  • New step "Write release notes from tag annotation" runs after version parsing and before the build. It does:
    git for-each-ref --format='%(contents)' refs/tags/$TAG
    
    and writes the output to android/app/src/main/play/release-notes/en-US/${TRACK}.txt.
  • actions/checkout@v4 gets fetch-tags: true so the tag object's annotation is reachable (default checkout only fetches the tag's commit, not the tag object itself).
  • Lightweight tags (git tag <name> with no -m or -a) are skipped — the workflow logs a fallback message and uses whatever file is already in the repo. Existing tag commands keep working.

Why no truncation

Google Play caps notes at 500 chars per locale per release. We emit ::warning:: if the message exceeds that, but let publishReleaseBundle reject loudly — better the tagger sees the failure and re-tags with a shorter message than silently ship a half-sentence.

Test plan

This is a CI workflow change; the only realistic test is to push an annotated tag against an internal track and watch the run.

  • Annotated-tag path: git tag -a android/v1.7.x -m "Test note from tag" + push → workflow logs show "Wrote N bytes to .../internal.txt" + preview block + AAB publishes with the new notes visible in Play Console.
  • Lightweight-tag path (regression): git tag android/v1.7.y (no -m) + push → workflow logs show "Tag 'android/v1.7.y' has no annotation; falling back…" + AAB publishes with the existing static internal.txt content.
  • Over-limit path: annotated tag with > 500 chars in -m → workflow shows the ::warning::, publishReleaseBundle rejects, run fails clearly.

Side note (not addressed here)

There's a duplicate android-release.yml at android/.github/workflows/ that GitHub does not read (only repo-root .github/ is honored). Both files are tracked but only the root one runs. Cleanup deletion is a separate concern.

🤖 Generated with Claude Code

Today release notes are a single static file at
app/src/main/play/release-notes/en-US/internal.txt, so every release goes
out with whatever was last committed there. Customizing per-release
required editing + committing + tagging in three steps.

Now the workflow extracts the annotated tag's message via
`git for-each-ref --format='%(contents)' refs/tags/<tag>` and writes it
to the per-track release-notes file before publishReleaseBundle runs.
The release flow becomes one CLI invocation:

  git tag -a android/v1.7.0-production -m "What users see in Play Store"
  git push origin android/v1.7.0-production

Lightweight tags (no -m / no -a) skip the step and fall back to whatever
file is in the repo today, so existing tag commands still work.

Implementation notes:
- actions/checkout gets `fetch-tags: true` so the tag object's annotation
  is reachable; without it, only the tag's commit is fetched.
- The notes file is written under the resolved track (production / beta /
  alpha / internal), so a single workflow handles all four.
- Google Play caps notes at 500 chars per locale per release. We don't
  truncate — we emit `::warning::` and let publishReleaseBundle reject,
  so the tagger gets a loud signal to shorten and re-tag rather than
  silently shipping a half-sentence.
- Only English (en-US) for now — matches the single locale already in the
  release-notes/ directory. Multi-locale support can be added later by
  parsing a structured tag-message format.

Side note: there's a duplicate android-release.yml at android/.github/
that GitHub doesn't read (only repo-root .github/ is honored). Deletion
is a separate cleanup, not part of this change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vinny2020 vinny2020 merged commit b82628e into main May 4, 2026
2 checks passed
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