Skip to content

ci(release): fail the release job when the changelog is empty - #241

Merged
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:ci/fail-on-empty-release-notes
Aug 25, 2026
Merged

ci(release): fail the release job when the changelog is empty#241
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:ci/fail-on-empty-release-notes

Conversation

@TimeToBuildBob

@TimeToBuildBob TimeToBuildBob commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #238, covering the "don't ship a release with no changelog" half of @ErikBjare's question on #236.

What actually went wrong with v0.14.0b2

It was not stuck in draft — gh release view v0.14.0b2 --json isDraft,body reports isDraft: false, body: "". It was published, with a blank body, because body_path was commented out and nothing generated release_notes.md. #238 fixed the generation; nothing yet fails when generation silently produces nothing.

Fix

Assert release_notes.md is non-empty before softprops/action-gh-release runs. A blank changelog now fails the release job with a GitHub error annotation instead of shipping.

Deliberately at the generation site rather than as a post-release check: here the failure is still recoverable by re-running the workflow, whereas an empty published release body is effectively permanent.

Note on the draft: change discussed in #236

This PR doesn't touch draft: — the two are orthogonal, and drafts weren't what caused the b2 problem. But one gotcha for whoever implements the prerelease-linked version suggested in the issue thread: the is_prerelease/is_stable output can't be used directly in this repo.

The release-gh job's step id is version, not check_version, and there's an existing comment at line 503 explaining why its output is untrustworthy here:

check-version-format-action classifies 0.x.x as not stable per semver, but aw-android uses 0.x.x for production releases.

The job already works around this by computing stability itself with a regex, and prerelease: on line 540 uses steps.version.outputs.is_stable — which by that comment's own logic is wrong for every v0.14.0-style stable release. So a draft: change probably wants to reuse the locally-computed IS_STABLE (promoted to a step output), and it's worth checking whether prerelease: has the same latent bug.

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. ActivityWatch#238
wired up the generator; this makes the failure loud if it ever regresses,
instead of shipping a release with no changelog.

Part of ActivityWatch#236.
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR prevents a GitHub release from being created when generated release notes are missing or zero-length.

  • Adds a non-empty-file check immediately after changelog generation.
  • Emits a GitHub Actions error annotation and stops the release job before publication when the check fails.

Confidence Score: 5/5

The PR appears safe to merge, with the new guard preventing zero-length release notes from reaching the publication step.

The check runs directly after changelog generation and exits the job before the release action when the generated file is absent or empty, without altering the successful release path.

Important Files Changed

Filename Overview
.github/workflows/build.yml Adds a correctly positioned fail-fast guard between release-note generation and the GitHub release action; no actionable changed-code defect was identified.

Reviews (1): Last reviewed commit: "ci(release): fail the release job when t..." | Re-trigger Greptile

@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.

@ErikBjare
ErikBjare merged commit 29c0e1f into ActivityWatch:master Aug 25, 2026
8 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.

2 participants