Skip to content

Commit

Permalink
Merge pull request #844 from chainguard-dev/imjasonh-patch-1
Browse files Browse the repository at this point in the history
Update release.md
  • Loading branch information
imjasonh authored Nov 15, 2023
2 parents 3a69e17 + c249e91 commit 728624e
Showing 1 changed file with 26 additions and 81 deletions.
107 changes: 26 additions & 81 deletions release.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]:vaikas/melange.git (fetch)
origin [email protected]:vaikas/melange.git (push)
upstream [email protected]:chainguard-dev/melange (fetch)
upstream no_push (push)
upstream-tag [email protected]:chainguard-dev/melange (fetch)
upstream-tag [email protected]: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`.

0 comments on commit 728624e

Please sign in to comment.