Releasing gdbforge¶
Automated builds and GitHub Releases are driven by .github/workflows/release.yml.
What the workflow does¶
| Trigger | Result |
|---|---|
Push tag v* (e.g. v1.0.0) |
Cross-build binaries → GitHub Release with assets and refresh GitHub Pages (mkdocs build) |
Push tag with a hyphen (e.g. v1.0.0-rc.1) |
Same, but marked prerelease (Pages still updates) |
Actions → Release → Run workflow (dry_run=true) |
Build only; upload workflow artifacts (no Release, no Pages) |
Targets: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64 (CGO_ENABLED=0).
Binaries are named gdbforge-<version>-<os>-<arch> with a .sha256 sidecar. The version is stamped via -ldflags -X main.version=… (gdbforge -version and :b about). Local task build uses git describe --tags --exact-match when you are on a tag; otherwise it stamps dev and About shows not for release.
Test without junking main¶
Releases are tag-driven, not main-push-driven. You can validate on a feature branch first.
1. Dry run (safest — no Release entry)¶
- Push the workflow file on your feature branch.
- GitHub → Actions → Release → Run workflow.
- Leave dry_run checked (
true). - Download the job artifacts and smoke-test a binary locally.
Nothing is published under Releases.
2. Prerelease tag (optional end-to-end)¶
From any commit (does not require merging to main):
That creates a pre-release. After you verify it:
3. Real v1.0.0 (after squash/merge to main)¶
Watch Actions → Release; the GitHub Release page fills in with notes + binaries, and the Deploy docs to GitHub Pages job publishes the static site.
Notes¶
- Do not put auto-release on every push to
main— tags keep history clean. - Day-to-day docs still deploy via docs.yml (
pushtomainunderdocs/). A release also redeploys Pages so the site matches the tagged tree. - Pages needs Settings → Pages → Source = GitHub Actions. Private repos need a plan that allows private Pages (or make the repo public).
- Prefer annotated tags (
git tag -a) for releases.