- Trigger the Prepare Release workflow.
- Merge PR to
master. - Merge
masterintodevelop.
Go modules have no go.mod-equivalent version field - a module's version comes entirely
from its git tag. Instead of writing the changelog by hand on the release branch, a
prepare-release workflow does it for you:
git checkout develop
git pullTrigger the Prepare Release workflow (workflow_dispatch in the Actions tab). It:
- Runs
git-cliff --bumpagainstdevelopto determine the next version (e.g.0.3.0) from commits since the last tag. - Prepends the generated changelog section to
CHANGELOG.md. - Opens a PR from an auto-created
release/0.3.0branch intomaster.
You review the PR (catch anything that shouldn't ship, fix as needed) - the
PR Validation
workflow runs against it - merge into master, which triggers tagging via the
Tag Release
workflow.
The tag push triggers the
Release
workflow, which re-runs the test suite against the tagged commit, requests the new version
from the Go module proxy so go get and pkg.go.dev see it immediately, generates the
changelog scoped to that tag, attaches it to a GitHub Release, and merges master back
into develop.
Always pass --ref develop explicitly - workflow_dispatch otherwise defaults to
whichever branch is the repo's current default, and prepare-release must run against
develop regardless of what that setting is set to at the time:
gh workflow run prepare-release.yaml --ref developOr trigger it directly from the Prepare Release workflow page, selecting develop from the branch dropdown.