|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This document describes how to publish a new release of `nv-flip`. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Push access to the default branch |
| 8 | +- A crates.io API token with publish rights for all workspace crates |
| 9 | +- `gh` CLI installed and authenticated (for creating the GitHub release) |
| 10 | + |
| 11 | +## Steps |
| 12 | + |
| 13 | +### 1. Determine the new version |
| 14 | + |
| 15 | +Pick the new version number following cargo semver conventions. For this document, |
| 16 | +we'll use `X.Y.Z` as a placeholder. |
| 17 | + |
| 18 | +### 2. Update CHANGELOG.md |
| 19 | + |
| 20 | +**a) Add the new version to the Table of Contents:** |
| 21 | + |
| 22 | +Find the line: |
| 23 | +``` |
| 24 | +- [Unreleased](#unreleased) |
| 25 | +``` |
| 26 | +Add a new entry directly below it: |
| 27 | +``` |
| 28 | +- [vX.Y.Z](#vXYZ) |
| 29 | +``` |
| 30 | +(The anchor is the version with dots removed, e.g. `v0.2.0` -> `#v020`) |
| 31 | + |
| 32 | +**b) Add a version heading under Unreleased:** |
| 33 | + |
| 34 | +Find: |
| 35 | +``` |
| 36 | +## Unreleased |
| 37 | +``` |
| 38 | +Add a blank line and a new version section below it, moving all existing unreleased |
| 39 | +items under the new heading: |
| 40 | +``` |
| 41 | +## Unreleased |
| 42 | +
|
| 43 | +## vX.Y.Z |
| 44 | +
|
| 45 | +Released YYYY-MM-DD |
| 46 | +
|
| 47 | +- (move all previously unreleased items here) |
| 48 | +``` |
| 49 | + |
| 50 | +**c) Update the Diffs section at the bottom:** |
| 51 | + |
| 52 | +Find the existing unreleased diff link: |
| 53 | +``` |
| 54 | +- [Unreleased](https://github.com/gfx-rs/nv-flip-rs/compare/vPREVIOUS...HEAD) |
| 55 | +``` |
| 56 | +Update it and add a new entry: |
| 57 | +``` |
| 58 | +- [Unreleased](https://github.com/gfx-rs/nv-flip-rs/compare/vX.Y.Z...HEAD) |
| 59 | +- [vX.Y.Z](https://github.com/gfx-rs/nv-flip-rs/compare/vPREVIOUS...vX.Y.Z) |
| 60 | +``` |
| 61 | + |
| 62 | +### 3. Update Cargo.toml |
| 63 | + |
| 64 | +Set the `version` field to the new version: |
| 65 | +```toml |
| 66 | +version = "X.Y.Z" |
| 67 | +``` |
| 68 | + |
| 69 | +If this is a workspace, update `workspace.package.version` and any intra-workspace |
| 70 | +dependency versions as needed. |
| 71 | + |
| 72 | +### 4. Update README.md |
| 73 | + |
| 74 | +Update any version references (dependency snippets, compatibility tables, etc.) |
| 75 | +to reflect the new version. |
| 76 | + |
| 77 | +### 5. Commit and tag |
| 78 | + |
| 79 | +```bash |
| 80 | +jj commit -m "Release vX.Y.Z" |
| 81 | +jj tag create vX.Y.Z |
| 82 | +jj git push |
| 83 | +``` |
| 84 | + |
| 85 | +### 6. Publish to crates.io |
| 86 | + |
| 87 | +```bash |
| 88 | +cargo publish -p nv-flip-sys |
| 89 | +cargo publish -p nv-flip |
| 90 | +``` |
| 91 | + |
| 92 | +### 7. Create the GitHub release |
| 93 | + |
| 94 | +Extract the release notes from `CHANGELOG.md` and create a release: |
| 95 | + |
| 96 | +```bash |
| 97 | +gh release create vX.Y.Z --title "vX.Y.Z" --notes "<paste release notes here>" |
| 98 | +``` |
| 99 | + |
| 100 | +### 8. Post-release |
| 101 | + |
| 102 | +Verify: |
| 103 | +- [ ] The crate is visible at https://crates.io/crates/nv-flip/X.Y.Z |
| 104 | +- [ ] Docs are building at https://docs.rs/nv-flip/X.Y.Z |
| 105 | +- [ ] The GitHub release exists at https://github.com/gfx-rs/nv-flip-rs/releases/tag/vX.Y.Z |
0 commit comments