mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-25 12:55:18 -07:00
8.3 KiB
8.3 KiB
Releasing
Prerequisites
claude(Claude Code CLI) installed, onPATH, and authenticated.changelog:buildandchangelog:prerelease-notesinvokeclaude -p --model sonnetto merge and rewritechanges/*.mdfragments into a polished, user-facing release body. Either OAuth login (claude /login) orANTHROPIC_API_KEYworks. Install from https://claude.com/claude-code if you don't already have it.
Stable Release
- Confirm
mainis green:gh run list --workflow CI --limit 5. - Confirm release-facing docs are current:
README.md,changes/*.md, and any toucheddocs-site/pages/config examples. - Run
bun run changelog:lint. - Bump
package.jsonto the release version. - Build release metadata before tagging (this calls
claude -plocally):bun run changelog:build --version <version> --date <yyyy-mm-dd>- The polished
CHANGELOG.mdandrelease/release-notes.mdare committed before tagging. Release CI no longer auto-builds the changelog; it fails fast ifchanges/*.mdfragments are still present on a tag-based run.
- The polished
- Review
CHANGELOG.mdandrelease/release-notes.md. Edit by hand if Claude missed something — the committed Markdown is what ships. - Run release gate locally:
bun run changelog:check --version <version>bun run verify:config-examplebun run typecheckbun run test:fastbun run test:envbun run buildWhen validating auto-update metadata, also run the relevant platform package build and confirmrelease/contains the generated updater metadata (*.yml) and blockmaps (*.blockmap). - If
docs-site/changed, also run:bun run docs:testbun run docs:buildbun run docs:build:versioned - Commit release prep.
- Tag the commit:
git tag v<version>. - Push commit + tag.
Prerelease
- Confirm release-facing docs and pending
changes/*.mdfragments are current. - Run
bun run changelog:lint. - Bump
package.jsonto the prerelease version, for example0.11.3-beta.1or0.11.3-rc.1. - Run the prerelease gate locally (this calls
claude -plocally):bun run changelog:prerelease-notes --version <version>bun run verify:config-examplebun run typecheckbun run test:fastbun run test:envbun run buildWhen validating packaged updater output, confirm the platform build writes*.ymland*.blockmapfiles underrelease/. - Commit the prerelease prep (package.json version bump + the generated
release/prerelease-notes.md). CI does not regenerate notes — it uses the committed file — so review it before committing. If you add morechanges/*.mdfragments for a later beta/RC, rerunbun run changelog:prerelease-notes --version <version>; the generator uses the existing prerelease notes as the baseline and asks Claude to merge only the new fragment material. Do not runbun run changelog:build. - Tag the commit:
git tag v<version>. - Push commit + tag.
Prerelease tags publish a GitHub prerelease only. They do not update CHANGELOG.md, docs-site/changelog.md, or the AUR package, and they do not consume changes/*.md fragments. The final stable release is still the point where bun run changelog:build consumes fragments into CHANGELOG.md and regenerates stable release notes.
Prerelease tags also do not update https://docs.subminer.moe/.
Notes:
- Versioning policy: SubMiner stays 0-ver. Large or breaking release lines still bump the minor number (
0.x.0), not1.0.0. Example: the next major line after0.6.5is0.7.0. - Supported prerelease channels are
betaandrc, with versions like0.11.3-beta.1and0.11.3-rc.1. - Pass
--dateexplicitly when you want the release stamped with the local cut date; otherwise the generator uses the current ISO date, which can roll over to the next UTC day late at night. changelog:checknow rejects tag/package version mismatches.changelog:prerelease-notesalso rejects tag/package version mismatches and writesrelease/prerelease-notes.mdwithout mutating tracked changelog files. When that file already exists, the generator includes it in the Claude prompt so later beta/RC notes reuse the reviewed text instead of starting over.changelog:buildgeneratesCHANGELOG.md+release/release-notes.md(both polished byclaude -p) and removes the releasedchanges/*.mdfragments. The CHANGELOG keeps internal notes inside a<details><summary>Internal changes</summary>collapse; the release notes drop them entirely.- The release workflow no longer auto-runs
changelog:build. If pendingchanges/*.mdfragments are present on a tag-based run, CI exits with a clear::error::pointing at the local fix. Runbun run changelog:build --version <version>locally, commit the polished output, then tag. - Do not tag while
changes/*.mdfragments still exist. - Prerelease tags intentionally keep
changes/*.mdfragments in place so multiple prereleases can reuse the same cumulative pending notes until the final stable cut.make cleanpreservesrelease/prerelease-notes.mdwhile deleting generated build artifacts. - If you need to repair a published release body (for example, a prior version’s section was omitted), regenerate notes from
CHANGELOG.mdand re-edit the release withgh release edit --notes-file. - Prerelease tags are handled by
.github/workflows/prerelease.yml, which always publishes a GitHub prerelease with all current release platforms and never runs the AUR sync job. - Tagged release workflow now also attempts to update
subminer-binon the AUR after GitHub Release publication. - Stable release tags update
https://docs.subminer.moe/andhttps://docs.subminer.moe/v/<version>/through.github/workflows/docs-pages.yml;/main/continues to show development docs frommain. - Keep Cloudflare Pages Git auto-deploy disabled for
docs.subminer.moe. Production docs are direct-uploaded by Wrangler from GitHub Actions with--branch main. - AUR publish is best-effort: the workflow retries transient SSH clone/push failures, then warns and leaves the GitHub Release green if AUR still fails. Follow up with a manual
git push aur masterfrom the AUR checkout when needed. - Required GitHub Actions secret:
AUR_SSH_PRIVATE_KEY. Add the matching public key to your AUR account before relying on the automation. - Release and prerelease workflows upload updater metadata (
*.yml) and blockmaps (*.blockmap) alongside platform artifacts. Do not remove those files whileelectron-updateris enabled. - macOS tray app updates use the standard
electron-updater/Squirrel path. Keeplatest-mac.yml, the macOSSubMiner-<version>-mac.zip, and ZIP blockmap published; Squirrel uses the ZIP payload even when the DMG remains the user-facing installer. - macOS update metadata and full ZIP downloads are routed through
/usr/bin/curlbefore Squirrel installation to avoid Electron main-process network crashes on update checks. - Windows tray app updates use the standard
electron-updater/NSIS path. Keeplatest.yml, the Windows NSIS installer, and installer blockmap published; updater HTTP is routed through main-process fetch to avoid Electron main-process network crashes during update checks. - Build config emits distinct ZIP names:
SubMiner-<version>-mac.zipfor the macOS Squirrel updater payload andSubMiner-<version>-win.zipfor the Windows portable fallback. The user-facing DMG and Windows installer keep the unqualifiedSubMiner-<version>basename. - Linux GitHub release metadata and asset downloads also use
/usr/bin/curlinstead of Electron networking for the same reason. - Local macOS build-output apps outside
/Applicationsor~/Applicationsskip native update checks. Manual tray and launcher checks still use GitHub release metadata to report newer releases, but automatic notifications stay quiet when native app installation is unsupported. To validate auto-update end to end, install the signed and notarized app bundle into one of those Applications folders and point it at a published updater feed. - The first updater-enabled release cannot update older installs automatically. Users need one manual install to get the updater code.
- Stable auto-update checks ignore beta/RC prereleases by default. Set
updates.channelto"prerelease"on a test install when validating beta/RC updater behavior.