Gophercloud follows semver.
Each Pull request must have a label indicating its impact on the API:
semver:patchfor changes that don't impact the APIsemver:minorfor changes that impact the API in a backwards-compatible fashionsemver:majorfor changes that introduce a breaking change in the API
Automation prevents merges if the label is not present.
The release notes for a given release are generated based on the PR title and its milestone:
- make sure that the PR title is descriptive
- add a milestone based on the semver label: x++ if major, y++ if minor, z++ if patch.
Check that all pull requests merged since the last release have the right milestone.
Once all PRs have a sensible title and are added to the right milestone, generate the release notes with the gh tool:
gh pr list \
--state merged \
--search 'milestone:vx.y.z' \
--json number,title \
--template \
'{{range .}}* {{ printf "[GH-%v](https://github.com/gophercloud/gophercloud/pull/%v)" .number .number }} {{ .title }}
{{end}}'Replace x.y.z with the current milestone.
Add that to the top of CHANGELOG.md. Also add any information that could be useful to consumers willing to upgrade.
Set the new version string in the DefaultUserAgent constant in provider_client.go.
Create a PR with these two changes. The new PR should be labeled with the semver label corresponding to the type of bump, and the milestone corresponding to its version.
The Go mod system relies on Git tags. In order to simulate a review mechanism, we rely on Github to create the tag through the Release mechanism.
- Prepare a new release
- Let Github generate the release notes by clicking on Generate release notes
- Click on Save draft
- Ask another Gophercloud maintainer to review and publish the release
Note: never change a release or force-push a tag. Tags are almost immediately picked up by the Go proxy and changing the commit it points to will be detected as tampering.