|
| 1 | +[compare]: https://github.com/conda/conda-pypi/compare |
| 2 | +[new release]: https://github.com/conda/conda-pypi/releases/new |
| 3 | +[release docs]: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes |
| 4 | +[rever docs]: https://regro.github.io/rever-docs |
| 5 | +[conda-forge]: https://github.com/conda-forge/conda-pypi-feedstock |
| 6 | + |
| 7 | +# Release Process |
| 8 | + |
| 9 | +> [!NOTE] |
| 10 | +> Throughout this document are references to the version number as `X.Y.Z`. Replace this with the correct version number. Do **not** prefix the version with a lowercase `v`. |
| 11 | +
|
| 12 | +## 1. Open the release issue. |
| 13 | + |
| 14 | +Create a release issue using the template below. After creating it, pin it for easy access. |
| 15 | + |
| 16 | +<details> |
| 17 | +<summary><h3>Release Template</h3></summary> |
| 18 | + |
| 19 | +#### Title: |
| 20 | +```markdown |
| 21 | +Release `X.Y.Z` |
| 22 | +``` |
| 23 | + |
| 24 | +#### Body: |
| 25 | +```markdown |
| 26 | +### Summary |
| 27 | + |
| 28 | +Placeholder for `conda-pypi X.Y.Z` release. |
| 29 | + |
| 30 | +| Pilot | <pilot> | |
| 31 | +|---|---| |
| 32 | +| Co-pilot | <copilot> | |
| 33 | + |
| 34 | +### Tasks |
| 35 | + |
| 36 | +[milestone]: https://github.com/conda/conda-pypi/milestone/<milestone> |
| 37 | +[process]: https://github.com/conda/conda-pypi/blob/main/RELEASE.md |
| 38 | +[releases]: https://github.com/conda/conda-pypi/releases |
| 39 | +[conda-forge]: https://github.com/conda-forge/conda-pypi-feedstock |
| 40 | + |
| 41 | +- [ ] [Complete outstanding PRs][milestone] |
| 42 | +- [ ] Create release PR (see [release process][process]) |
| 43 | +- [ ] [Publish release][releases] |
| 44 | +- [ ] Bump [conda-forge feedstock][conda-forge] |
| 45 | +- [ ] Announce release |
| 46 | +``` |
| 47 | + |
| 48 | +</details> |
| 49 | + |
| 50 | +## 2. Run rever. |
| 51 | + |
| 52 | +<details> |
| 53 | +<summary><h2>Rever steps</h2></summary> |
| 54 | + |
| 55 | +1. Clone and `cd` into the repository if you haven't done so already: |
| 56 | + |
| 57 | + ```bash |
| 58 | + $ git clone git@github.com:conda/conda-pypi.git |
| 59 | + $ cd conda-pypi |
| 60 | + ``` |
| 61 | + |
| 62 | +2. Fetch the latest changes and create a versioned branch off `main` for the release PR: |
| 63 | + |
| 64 | + ```bash |
| 65 | + $ git fetch upstream |
| 66 | + $ git checkout -b changelog-X.Y.Z upstream/main |
| 67 | + ``` |
| 68 | + |
| 69 | +3. Run `rever --activities authors --force X.Y.Z`: |
| 70 | + |
| 71 | + > **Note:** |
| 72 | + > Include `--force` when re-running any rever command for the same version; without it, rever skips already-completed activities. |
| 73 | + |
| 74 | + ```bash |
| 75 | + $ pixi run -e release rever --activities authors --force X.Y.Z |
| 76 | + ``` |
| 77 | + |
| 78 | + - If rever reports unknown authors, add or update entries in `.authors.yml` (new contributors get a new entry; existing contributors using a new name/email get an `aliases`/`alternate_emails` addition). |
| 79 | + |
| 80 | + - Verify the result with: |
| 81 | + |
| 82 | + ```bash |
| 83 | + $ git shortlog -se |
| 84 | + ``` |
| 85 | + |
| 86 | + Compare this list against `AUTHORS.md` and repeat until they match. |
| 87 | + |
| 88 | +4. Review news snippets in `news/` (use Markdown, **not** reStructuredText). Add snippets for any undocumented changes using the `news/TEMPLATE` as a guide, naming files `<PR #>-<short-slug>.md`. Commit when satisfied: |
| 89 | + |
| 90 | + ```bash |
| 91 | + $ git add news/ |
| 92 | + $ git commit -m "Update news" |
| 93 | + ``` |
| 94 | + |
| 95 | +5. Ensure the `[//]: # (current developments)` marker is present at the top of `CHANGELOG.md`, then run `rever --activities changelog --force X.Y.Z`: |
| 96 | + |
| 97 | + ```bash |
| 98 | + $ pixi run -e release rever --activities changelog --force X.Y.Z |
| 99 | + ``` |
| 100 | + |
| 101 | + - If this succeeds, undo the commit so both activities can be run together in the next step: |
| 102 | + |
| 103 | + ```bash |
| 104 | + $ git reset --hard HEAD~1 |
| 105 | + ``` |
| 106 | + |
| 107 | +6. Run both activities together so the contributor list is embedded in the changelog entry: |
| 108 | + |
| 109 | + ```bash |
| 110 | + $ pixi run -e release rever --force X.Y.Z |
| 111 | + ``` |
| 112 | + |
| 113 | +7. Use [GitHub's auto-generated release notes][new release] to identify first-time contributors and add `made their first contribution in <URL>` next to their entry in the Contributors section of `CHANGELOG.md`. Commit: |
| 114 | +
|
| 115 | + ```bash |
| 116 | + $ git add CHANGELOG.md |
| 117 | + $ git commit -m "Add first-time contributions" |
| 118 | + ``` |
| 119 | +
|
| 120 | +8. Push the versioned branch: |
| 121 | +
|
| 122 | + ```bash |
| 123 | + $ git push -u upstream changelog-X.Y.Z |
| 124 | + ``` |
| 125 | +
|
| 126 | +9. Open the Release PR targeting `main`: |
| 127 | +
|
| 128 | + ```markdown |
| 129 | + ## Description |
| 130 | +
|
| 131 | + ✂️ snip snip ✂️ the making of a new release. |
| 132 | +
|
| 133 | + Xref #<RELEASE ISSUE> |
| 134 | + ``` |
| 135 | +
|
| 136 | +10. [Create][new release] the release and **save as draft**: |
| 137 | +
|
| 138 | + | Field | Value | |
| 139 | + |---|---| |
| 140 | + | Choose a tag | `X.Y.Z` | |
| 141 | + | Target | `main` | |
| 142 | + | Body | copy/paste from `CHANGELOG.md` | |
| 143 | +
|
| 144 | + > **Note:** Only publish the release after the release PR is merged. |
| 145 | +
|
| 146 | +</details> |
| 147 | +
|
| 148 | +## 3. Wait for review and approval of the release PR. |
| 149 | +
|
| 150 | +## 4. Merge the release PR and publish the release. |
| 151 | +
|
| 152 | +Go to the [releases page][new release], add the release notes from `CHANGELOG.md` to the draft, and publish. |
| 153 | +
|
| 154 | +## 5. Bump the [conda-forge feedstock][conda-forge]. |
| 155 | +
|
| 156 | +The `regro-cf-autotick-bot` will usually open a PR automatically. Review and merge it (or push fixes to the autotick branch if needed). |
| 157 | +
|
| 158 | +## 6. Announce the release. |
0 commit comments