Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: updated CONTRIBUTING.md to add release instructions #1411

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,118 @@ feature.
Raise issues and feature requests in the GitHub [issue tracker](https://github.com/fujiapple852/trippy/issues) and raise
all changes as GitHub [pull requests](https://github.com/fujiapple852/trippy/pulls).

## Release instructions

Instructions for releasing a new `0.xx.0` version of Trippy.

Many distribution packages are managed by external maintainers, however the following are managed by the Trippy
maintainers:

- GitHub Releases
- Crates.io
- Docker
- Snapcraft
- Winget
- Ubuntu PPA

### Prerequisites

- Check the MSRV (Minimum Supported Rust Version) in the `trippy` crate `Cargo.toml` is still correct.

> [!NOTE]
> The MSRV should typically be the version from around 1 year before the current date to maximise compatibility.

- Update all dependencies to the latest SemVer compatible versions

> [!NOTE]
> Some distributions may not support the latest versions of all dependencies, so be conservative with updates.

- Record and add an `assets/0.xx.0/demo.gif` for the new version
- Update the `README.md` with details of the features in the new version
- Update the `CHANGELOG.md` for the new version
- Update the `RELEASES.md` for the new version
- Update the version to `0.xx.0` in `Cargo.toml`, `snap/snapcraft.yaml` & `ubuntu-ppa/release.sh`

### Testing

Trippy is tested extensively in CI on Linux, Windows and macOS for every pull request. However, it is recommended to
test the release binaries on all platforms before release.

### Github Releases

- Tag the release with the version number `0.xx.0` and push the tag to GitHub:

```shell
git tag 0.xx.0
git push origin tag 0.xx.0
```

This will trigger the GitHub Actions workflow to build the release binaries and publish them to the GitHub release page.

- Edit GitHub release page and copy the relevant sections from `RELEASES.md` and `CHANGELOG.md`. Refer to previous
releases for the format.

### Crates.io

- Publish all crates to crates.io (in order):

```shell
cargo publish trippy-dns
cargo publish trippy-packet
cargo publish trippy-privilege
cargo publish trippy-tui
cargo publish trippy
```

### Docker

From the repository root directory:

```shell
docker build . -t fujiapple/trippy:0.xx.0 -t fujiapple/trippy:latest
docker push fujiapple/trippy:0.xx.0
docker push fujiapple/trippy:latest
```

### Snapcraft

- Promote the first `0.xx.0` build to the `latest/stable` channel from the
Snapcraft [releases](https://snapcraft.io/trippy/releases) page

### Winget

- Download the latest release Windows `zip` from
the [GitHub releases page](https://github.com/fujiapple852/trippy/releases/latest)
- Determine the SHA256 checksum of the release:

```shell
shasum -a 256 trippy-0.xx.0-x86_64-pc-windows-msvc.zip
```

- Update the `winget` [fork](https://github.com/fujiapple852/winget-pkgs) to the latest upstream
- Checkout the fork and create a branch called `fujiapple852-trippy-0.xx.0`
- Go to the Trippy directory

```shell
cd winget-pkgs/manifests/f/FujiApple/Trippy
```

- Copy the previous `0.yy.0` directory to a new directory for the new `0.xx.0` version
- Update the `PackageVersion`, `ReleaseDate` and update all paths to the new version
- Update the `InstallerSha256` with the checksum from the previous step
- Update the release notes from [CHANGELOG.md](https://github.com/fujiapple852/trippy/blob/master/CHANGELOG.md)
- Commit the changes with message:

```text
update fujiapple852/trippy to 0.xx.0
```

- Push the branch to the fork and create a pull request against the upstream `winget-pkgs` repository

### Ubuntu PPA

See the Ubuntu PPA [README.md](https://github.com/fujiapple852/trippy/blob/master/ubuntu-ppa/README.md)

## Help wanted

There are several the issues tagged
Expand Down