|
| 1 | +# Release process |
| 2 | + |
| 3 | +The release process follows the usual PR-and-review flow, allowing an external reviewer to have a final check before publishing. |
| 4 | + |
| 5 | +In order to ease downstream packaging of Rust binaries, an archive of vendored dependencies is also provided (only relevant for offline builds). |
| 6 | + |
| 7 | +## Requirements |
| 8 | + |
| 9 | +This guide requires: |
| 10 | + |
| 11 | + * A web browser (and network connectivity) |
| 12 | + * `git` |
| 13 | + * [GPG setup][GPG setup] and personal key for signing |
| 14 | + * [git-evtag](https://github.com/cgwalters/git-evtag/) |
| 15 | + * `cargo` (suggested: latest stable toolchain from [rustup][rustup]) |
| 16 | + * A verified account on crates.io |
| 17 | + * Write access to this GitHub project |
| 18 | + * Upload access to this project on GitHub, crates.io |
| 19 | + * Membership in the [Fedora CoreOS Crates Owners group](https://github.com/orgs/coreos/teams/fedora-coreos-crates-owners/members) |
| 20 | + |
| 21 | +## Release checklist |
| 22 | + |
| 23 | +- Prepare local branch+commit |
| 24 | + - [ ] `git checkout -b release` |
| 25 | + - [ ] Bump the version number in `Cargo.toml`. Usually you just want to bump the patch. |
| 26 | + - [ ] Run `cargo build` to ensure `Cargo.lock` would be updated |
| 27 | + - [ ] Commit changes `git commit -a -m 'Release x.y.z'`; include some useful brief changelog. |
| 28 | + |
| 29 | +- Prepare the release |
| 30 | + - [ ] Run `./ci/prepare-release.sh` |
| 31 | + |
| 32 | +- Validate that `origin` points to the canonical upstream repository and not your fork: |
| 33 | + `git remote show origin` should not be `github.com/$yourusername/$project` but should |
| 34 | + be under the organization ownership. The remote `yourname` should be for your fork. |
| 35 | + |
| 36 | +- open and merge a PR for this release: |
| 37 | + - [ ] `git push --set-upstream origin release` |
| 38 | + - [ ] open a web browser and create a PR for the branch above |
| 39 | + - [ ] make sure the resulting PR contains the commit |
| 40 | + - [ ] in the PR body, write a short changelog with relevant changes since last release |
| 41 | + - [ ] get the PR reviewed, approved and merged |
| 42 | + |
| 43 | +- publish the artifacts (tag and crate): |
| 44 | + - [ ] `git fetch origin && git checkout ${RELEASE_COMMIT}` |
| 45 | + - [ ] verify `Cargo.toml` has the expected version |
| 46 | + - [ ] `git-evtag sign v${RELEASE_VER}` |
| 47 | + - [ ] `git push --tags origin v${RELEASE_VER}` |
| 48 | + - [ ] `cargo publish` |
| 49 | + |
| 50 | +- publish this release on GitHub: |
| 51 | + - [ ] find the new tag in the [GitHub tag list](https://github.com/coreos/bootupd/tags), click the triple dots menu, and create a release for it |
| 52 | + - [ ] write a short changelog (i.e. re-use the PR content) |
| 53 | + - [ ] upload `target/${PROJECT}-${RELEASE_VER}-vendor.tar.gz` |
| 54 | + - [ ] record digests of local artifacts: |
| 55 | + - `sha256sum target/package/${PROJECT}-${RELEASE_VER}.crate` |
| 56 | + - `sha256sum target/${PROJECT}-${RELEASE_VER}-vendor.tar.gz` |
| 57 | + - [ ] publish release |
| 58 | + |
| 59 | +- clean up: |
| 60 | + - [ ] `git push origin :release` |
| 61 | + - [ ] `cargo clean` |
| 62 | + - [ ] `git checkout main` |
| 63 | + |
| 64 | +- Fedora packaging: |
| 65 | + - [ ] update the `rust-bootupd` spec file in [Fedora](https://src.fedoraproject.org/rpms/rust-bootupd) |
| 66 | + - bump the `Version` |
| 67 | + - switch the `Release` back to `1%{?dist}` |
| 68 | + - remove any patches obsoleted by the new release |
| 69 | + - update changelog |
| 70 | + - [ ] run `spectool -g -S rust-bootupd.spec` |
| 71 | + - [ ] run `kinit [email protected]` |
| 72 | + - [ ] run `fedpkg new-sources <crate-name> <vendor-tarball-name>` |
| 73 | + - [ ] PR the changes in [Fedora](https://src.fedoraproject.org/rpms/rust-bootupd) |
| 74 | + - [ ] once the PR merges to rawhide, merge rawhide into the other relevant branches (e.g. f35) then push those, for example: |
| 75 | + ```bash |
| 76 | + git checkout rawhide |
| 77 | + git pull --ff-only |
| 78 | + git checkout f35 |
| 79 | + git merge --ff-only rawhide |
| 80 | + git push origin f35 |
| 81 | + ``` |
| 82 | + - [ ] on each of those branches run `fedpkg build` |
| 83 | + - [ ] once the builds have finished, submit them to [bodhi](https://bodhi.fedoraproject.org/updates/new), filling in: |
| 84 | + - `rust-bootupd` for `Packages` |
| 85 | + - selecting the build(s) that just completed, except for the rawhide one (which gets submitted automatically) |
| 86 | + - writing brief release notes like "New upstream release; see release notes at `link to GitHub release`" |
| 87 | + - leave `Update name` blank |
| 88 | + - `Type`, `Severity` and `Suggestion` can be left as `unspecified` unless it is a security release. In that case select `security` with the appropriate severity. |
| 89 | + - `Stable karma` and `Unstable` karma can be set to `2` and `-1`, respectively. |
| 90 | + - [ ] [submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS testing-devel |
| 91 | + - [ ] [submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS next-devel if it is [open](https://github.com/coreos/fedora-coreos-pipeline/blob/main/next-devel/README.md) |
| 92 | + |
| 93 | +- RHCOS packaging: |
| 94 | + - [ ] update the `rust-bootupd` spec file |
| 95 | + - bump the `Version` |
| 96 | + - switch the `Release` back to `1%{?dist}` |
| 97 | + - remove any patches obsoleted by the new release |
| 98 | + - update changelog |
| 99 | + - [ ] run `spectool -g -S rust-bootupd.spec` |
| 100 | + - [ ] run `kinit [email protected]` |
| 101 | + - [ ] run `rhpkg new-sources <crate-name> <vendor-tarball-name>` |
| 102 | + - [ ] PR the changes |
| 103 | + - [ ] get the PR reviewed and merge it |
| 104 | + - [ ] update your local repo and run `rhpkg build` |
| 105 | + |
| 106 | +CentOS Stream 9 packaging: |
| 107 | + - [ ] to be written |
| 108 | + |
| 109 | +[rustup]: https://rustup.rs/ |
| 110 | +[crates-io]: https://crates.io/ |
| 111 | +[GPG setup]: https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification |
0 commit comments