Skip to content

ci: golden draft→publish release workflow#84

Merged
darkharasho merged 1 commit into
mainfrom
ci/golden-release-workflow
Jun 23, 2026
Merged

ci: golden draft→publish release workflow#84
darkharasho merged 1 commit into
mainfrom
ci/golden-release-workflow

Conversation

@darkharasho

Copy link
Copy Markdown
Owner

Why

Our GitHub-releases RSS feed (polled by the AxiTools bot) gets tripped up when a release is published before its artifacts/changelog are attached — the bot announces an empty/partial release that never gets corrected. This brings TopStatsAIO in line with the proven axipulse/axibridge pattern so it only ever surfaces complete releases.

What

Adds .github/workflows/release.yml, triggered on v* tag push:

  1. testnpm ci + npm test (jest)
  2. prepare-release — create an empty draft release for the tag (deletes a pre-existing non-draft first)
  3. build (win + linux matrix) — electron-builder --publish always uploads installers, latest.yml and blockmaps straight into the draft (package.json already sets publish.releaseType=draft)
  4. publish — extract this tag's section from RELEASE_NOTES.md (fails loudly if missing, so notes are never empty/stale), set it on the release, then atomically gh release edit --draft=false. Optional Discord webhook ping gated on a DISCORD_WEBHOOK_URL repo variable.

Because drafts don't appear in releases.atom, the release becomes visible to the feed only once it's fully built and noted.

Decisions (per discussion)

  • Notes: read from committed RELEASE_NOTES.md (deterministic, no secret) rather than regenerating via OpenAI in CI. Keep generating notes locally with your script before tagging.
  • Build: native electron-builder --publish (auto latest.yml + blockmap for the auto-updater). Installer filenames become electron-builder defaults (e.g. TopStatsAIO Setup 3.4.4.exe) instead of the scripts/build-win.js renamed scheme.
  • Linux: AppImage only in CI (matches build-linux.js's no-flatpak fallback).

Verify before merge

Cut a throwaway pre-release tag on this branch (e.g. v0.0.0-test) and confirm: a draft is created → artifacts upload → notes set → flips to published, and releases.atom shows it only after publish. Delete the test release/tag afterward.

🤖 Generated with Claude Code

Build artifacts and write notes into a draft release, then atomically flip
to published so GitHub's releases.atom feed never surfaces an incomplete
release. Notes come from RELEASE_NOTES.md (fails if the tag's section is
missing); installers built+published via native electron-builder.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@darkharasho darkharasho merged commit 76b4526 into main Jun 23, 2026
1 check passed
@darkharasho darkharasho deleted the ci/golden-release-workflow branch June 23, 2026 07:23
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