Skip to content

ci(release): generate release notes instead of shipping an empty body - #238

Merged
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/release-notes-changelog
Aug 25, 2026
Merged

ci(release): generate release notes instead of shipping an empty body#238
ErikBjare merged 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/release-notes-changelog

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Fixes item 1 of #236.

Problem

release-gh created GitHub releases with no description. body_path was commented out, and nothing generated the file it pointed at:

        # body_path: dist/release_notes/release_notes.md

That's why v0.14.0b2 went to the Play Store stable channel with an empty changelog.

Fix

Wire up the same generator the main ActivityWatch and gptme repos use. build_changelog.py explicitly supports cross-repo reuse:

NOTE: This script can be downloaded as-is and run from your repository.
Repos using this script: ActivityWatch/activitywatch, ErikBjare/gptme

So it's checked out from ActivityWatch/activitywatch (sparse, scripts/ only) rather than vendoring a copy that would drift out of sync.

Three things this needed:

  1. A checkout. The job never checked out the repo at all — it only downloaded artifacts. Added with fetch-depth: 0 (needs full history + tags to resolve the previous release and walk the range) and submodules: recursive so aw-server-rust changes appear in the notes when the pointer moves. It runs before download-artifact, since checkout cleans the workspace.
  2. Previous-release resolution. get_latest_release.sh filters out the tag being released, so it resolves to the previous one. STABLE_ONLY is fed from the existing check-version-format-action output, so a stable release diffs against the last stable rather than the last beta. Falls back to the nearest ancestor tag if no prior release matches.
  3. Uncommenting body_path.

Verification

Ran the generator locally against the real v0.14.0b1...v0.14.0b2 range. It resolves the previous tag correctly (v0.14.0b1) and produces a contributor list plus a categorized changelog covering all 9 commits:

These are the release notes for ActivityWatch for Android version v0.14.0b2.

# Contributors

Thanks to everyone who contributed to this release:

@0xbrayo, @erikbjare, @Lorite, @TimeToBuildBob

# Changelog

Changes since v0.14.0b1:

## 📦 aw-android

### ✨ Features (1)
 - feat: add Material You monochrome launcher icon (#230)

### 🐛 Fixes (7)
 - fix: save bucket exports from the WebView instead of dropping them (#229)
 - fix(sync): make Sync Settings reachable from the navigation drawer (#221)
 - fix(notify): open MainActivity when notification is tapped (#225)
 - fix(sync): make the SAF mirror recursive and structure-preserving (#222)
 - fix(notify): use ActivityWatch logo as notification small icon (#227)
 - fix(widget): group category time by full path (#231)
 - fix: reword foreground notification to not expose internals (#223)

### 🔨 Misc (1)
 - chore: bump versionName to 0.14.0b2, versionCode to 40

Also confirmed the workflow YAML parses and the step ordering is correct.

Notes

…ty body

The release-gh job created releases with no description: body_path was
commented out and nothing generated the file it pointed at. v0.14.0b2
shipped to the Play Store stable channel with an empty changelog.

Wire up the same generator the main ActivityWatch and gptme repos use.
build_changelog.py explicitly supports cross-repo reuse (see its module
docstring), so check it out from ActivityWatch/activitywatch rather than
vendoring a copy that would drift.

The job previously never checked out the repo at all, so add a checkout
with full history/tags (needed to resolve the previous release tag and
walk the commit range) before download-artifact, which cleans the
workspace.

get_latest_release.sh filters out the tag being released, so it resolves
to the previous release; STABLE_ONLY makes a stable release diff against
the last stable one rather than the last beta. Falls back to the nearest
ancestor tag when no prior release matches.

Verified locally against the real v0.14.0b1...v0.14.0b2 range: produces a
contributor list and a categorized changelog of all 9 commits.

Refs ActivityWatch#236
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

The release workflow now generates GitHub release notes from repository history and attaches them to the draft release.

  • Checks out full history, tags, and submodules for changelog generation.
  • Pins the reusable ActivityWatch changelog tooling to a specific commit.
  • Distinguishes stable tags from prereleases when selecting the previous release.
  • Supplies the generated Markdown through body_path.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/build.yml Adds pinned changelog generation to the GitHub release job and resolves both previously reported issues.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Tag[Version tag] --> Checkout[Checkout full repository history]
  Checkout --> Tools[Checkout pinned changelog tooling]
  Tools --> Classify[Classify stable or prerelease tag]
  Classify --> Previous[Resolve previous release tag]
  Previous --> Generate[Generate release_notes.md]
  Generate --> Draft[Create draft GitHub release with body]
Loading

Reviews (2): Last reviewed commit: "fix(release-gh): pin activitywatch check..." | Re-trigger Greptile

Comment thread .github/workflows/build.yml Outdated
Comment thread .github/workflows/build.yml
…ion for changelog

P1: check-version-format-action classifies 0.x.x as not stable (semver
convention), so STABLE_ONLY got 'false' on a stable release, causing the
changelog to diff against the last beta instead of the last stable. Mirror
the release-play job's regex check instead.

P2: pin the activitywatch checkout to a known-good commit rather than
tracking the default branch, so release-capable jobs don't execute from
an unreviewed upstream revision.

Addresses Greptile P1 + P2 findings on PR ActivityWatch#238.
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Addressed the two Greptile findings in df7e062:

P1 — Stable release range truncated (line 501): check-version-format-action classifies 0.x.x as not stable per semver convention, so is_stable would be "false" for a production release like v0.14.0. That made STABLE_ONLY=false, and the changelog would diff against the last beta instead of the last stable. Fixed by using the same regex the release-play job already uses (^[0-9]+\.[0-9]+\.[0-9]+$) to compute IS_STABLE directly from the tag, bypassing the action's semver classification.

P2 — Changelog tooling unpinned (line 467): Added ref: a17fa8aff7465268973a10d7d43aeb6741492e03 to pin the activitywatch/activitywatch checkout to the current master HEAD (2026-08-24), so the release-capable job runs reviewed scripts rather than tracking the default branch.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click.

This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Review convergence — ready to merge

Greptile flagged two findings; both are false positives against the current HEAD:

  • P1 "Stable range truncated" — false positive. Greptile reviewed an earlier commit that used steps.version.outputs.is_stable (which misclassifies 0.x.x). The current HEAD replaces that with an inline regex (^[0-9]+\.[0-9]+\.[0-9]+$) that correctly identifies 0.x.x as stable. Thread resolved.
  • P2 "Changelog tooling unpinned" — false positive. Greptile reviewed the commit before ref: a17fa8aff7465268973a10d7d43aeb6741492e03 was added. Current HEAD is pinned. Thread resolved.

CI: ✅ all checks pass (Test, E2E, Build aw-server-rust, Greptile).

Fixed: empty release body (the original issue). Remaining: none. Converged in 1 round.

@ErikBjare
ErikBjare merged commit 8cc09f0 into ActivityWatch:master Aug 25, 2026
8 checks passed
ErikBjare pushed a commit that referenced this pull request Aug 25, 2026
v0.14.0b2 was published with an empty body: `body_path` was commented out,
so nothing generated release_notes.md and the release went out blank. #238
wired up the generator; this makes the failure loud if it ever regresses,
instead of shipping a release with no changelog.

Part of #236.
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.

2 participants