diff --git a/release.md b/release.md index 0f9766d4b..486805a1f 100644 --- a/release.md +++ b/release.md @@ -1,94 +1,39 @@ # Melange Release Process -## Prerequisites - -Set up the repos correctly, and make sure you have right access to the repo to -perform tag pushes. It can be helpful to create a distrinct repo just for the -tags push so that you don't accidentally push by accident. For example, my repos -look like this: - -```shell -git remote -v -``` - -And output: -``` -origin git@github.com:vaikas/melange.git (fetch) -origin git@github.com:vaikas/melange.git (push) -upstream git@github.com:chainguard-dev/melange (fetch) -upstream no_push (push) -upstream-tag git@github.com:chainguard-dev/melange (fetch) -upstream-tag git@github.com:chainguard-dev/melange (push) -``` - -Note that my regular `upstream` is configured with `no_push` to make sure I -don't accidentally try to push anything there. - -## Steps - -### Sync tags - -Ensure that your local branch is up-to-date from the upstream: - -```shell -git pull upstream main --tags -``` - -### Pick a new version number - -The Melange repo uses [semver](https://semver.org/). Your first step is to -determine the latest tag used. - -List the latest tags in date order: - -```shell -git tag | tail -``` - -Example output: - -``` -v0.1.0 -v0.2.0 -v0.3.0 -v0.3.1 -v0.3.2 -v0.4.0 -v0.5.0 -``` - -Show a list of changes since the latest version (v0.5.0): - -```shell -git log v0.5.0.. -``` - -If the commits include a new feature or breaking change, bump the minor version. -If it only includes bug fixes, bump the patch version. - -### Tagging - -Once you have a version number in mind (for our example v0.5.1), tag it locally: - -```shell -git tag -a v0.5.1 -m v0.5.1 -``` - -Then push the tag upstream: - -```shell -git push upstream-tag v0.5.1 -``` +## Patch releases + +The most common type of release of Melange is a patch release. Generally we should aim to do these as often as necessary to release _backward compatible_ changes, especially to release updated dependencies to fix vulnerabilities. + +To cut a release: +- go to https://github.com/chainguard-dev/melange/releases/new +- click "Choose a tag" then "Find or create a new tag" +- type a new patch version tag for the latest minor version + - for example, if the latest version is `v0.5.5`, create a patch release `v0.5.6` +- click "Create new tag: v0.X.Y on publish" + - you can leave the release title empty +- click "Generate release notes" + - make any editorial changes to the release notes you think are relevant +- make sure "Set as the latest release" is checked +- click **"Publish release"** ### Monitor the release automation Once the tag is pushed, the [`Create Release` action](https://github.com/chainguard-dev/melange/actions/workflows/release.yaml) -will generate the appropriate release artifacts and create a draft release. +will attach the appropriate release artifacts and update release notes. At the time of this writing, the release job takes 20 to 30 minutes to execute. -### Publish +Make any editorial changes to the release notes you think are necessary. +You may want to highlight certain changes or remove items that aren't interesting. Once the `Release` action has been completed successfully, find your release on the [releases page](https://github.com/chainguard-dev/melange/releases) +## Minor releases + +Occasionally there are large or breaking changes to Melange that we want to highlight with a new minor release. +A minor release should be cut shortly after a breaking change is made, so that regular patch releases don't release breaking changes. + +The process for cutting a release is exactly the same as above, except that you should pick a new minor version. + +For example, if the latest version is `v0.5.5`, create a minor release `v0.6.0`.