Skip to content

Commit 508d604

Browse files
chore: improve the release instructions (#76)
1 parent 3e57bdf commit 508d604

File tree

2 files changed

+54
-91
lines changed

2 files changed

+54
-91
lines changed

.github/maintainers_guide.md

Lines changed: 53 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -134,113 +134,76 @@ Alternatively, you can deploy from your local machine with:
134134

135135
#### Development Deployment
136136

137-
Deploying a new version of this library to Pypi is triggered by publishing a Github Release.
137+
Deploying a new version of this library to PyPI is triggered by publishing a GitHub Release.
138138
Before creating a new release, ensure that everything on a stable branch has
139139
landed, then [run the tests](#run-all-the-unit-tests).
140140

141-
1. Create a branch in which the development release will live:
142-
- Bump the version number in adherence to
143-
[Semantic Versioning](http://semver.org/) and
144-
[Developmental Release](https://peps.python.org/pep-0440/#developmental-releases)
145-
in `slack_cli_hooks/version.py`
146-
- Example the current version is `1.2.3` a proper development bump would be
147-
`1.2.3.dev0`
148-
- `.dev` will indicate to pip that this is a
149-
[Development Release](https://peps.python.org/pep-0440/#developmental-releases)
150-
- Note that the `dev` version can be bumped in development releases:
151-
`1.2.3.dev0` -> `1.2.3.dev1`
152-
- Commit with a message including the new version number. For example
153-
`1.2.3.dev0` & Push the commit to a branch where the development release
154-
will live (create it if it does not exist)
155-
- `git checkout -b future-release`
156-
- `git commit -m 'version 1.2.3.dev0'`
157-
- `git push -u origin future-release`
158-
2. Create a new GitHub Release from the
159-
[Releases page](https://github.com/slackapi/python-slack-hooks/releases) by
160-
clicking the "Draft a new release" button.
161-
3. Input the version manually into the "Choose a tag" input. You must use the
162-
same version found in `slack_cli_hooks/version.py`
163-
164-
- After you input the new version, click the "Create a new tag: x.x.x on
165-
publish" button. This won't create your tag immediately.
166-
- Auto-generate the release notes by clicking the "Auto-generate release
167-
notes" button. This will pull in changes that will be included in your
168-
release.
169-
- Edit the resulting notes to ensure they have decent messaging that are
170-
understandable by non-contributors, but each commit should still have it's
171-
own line.
172-
- Ensure that this version adheres to
173-
[semantic versioning](http://semver.org/) and
174-
[Developmental Release](https://peps.python.org/pep-0440/#developmental-releases).
175-
See [Versioning](#versioning-and-tags) for correct version format.
176-
177-
4. Set the "Target" input to the feature branch with the development changes.
178-
5. Name the release title after the version tag. It should match the updated
179-
value from `slack_cli_hooks/version.py`!
180-
6. Make any adjustments to generated release notes to make sure they are
181-
accessible and approachable and that an end-user with little context about
182-
this project could still understand.
183-
7. Select "Set as a pre-release"
184-
8. Publish the release by clicking the "Publish release" button!
185-
9. After a few minutes, the corresponding version will be available on
186-
<https://pypi.org/project/slack-cli-hooks/>.
187-
10. (Slack Internal) Communicate the release internally
141+
1. Create the commit for the release
142+
1. In `slack_cli_hooks/version.py` bump the version number in adherence to [Semantic Versioning](http://semver.org/) and [Developmental Release](https://peps.python.org/pep-0440/#developmental-releases).
143+
- Example: if the current version is `1.2.3`, a proper development bump would be `1.2.4.dev0`
144+
- `.dev` will indicate to pip that this is a [Development Release](https://peps.python.org/pep-0440/#developmental-releases)
145+
- Note that the `dev` version can be bumped in development releases: `1.2.4.dev0` -> `1.2.4.dev1`
146+
2. Commit with a message including the new version number. For example `1.2.4.dev0` & push the commit to a branch where the development release will live (create it if it does not exist)
147+
1. `git checkout -b future-release`
148+
2. `git commit -m 'chore(release): version 1.2.4.dev0'`
149+
3. `git push -u origin future-release`
150+
2. Create a new GitHub Release
151+
1. Navigate to the [Releases page](https://github.com/slackapi/python-slack-hooks/releases).
152+
2. Click the "Draft a new release" button.
153+
3. Set the "Target" to the feature branch with the development changes.
154+
4. Click "Tag: Select tag"
155+
5. Input a new tag name manually. The tag name must match the version in `slack_cli_hooks/version.py` prefixed with "v" (e.g., if version is `1.2.4.dev0`, enter `v1.2.4.dev0`)
156+
6. Click the "Create a new tag" button. This won't create your tag immediately.
157+
7. Click the "Generate release notes" button.
158+
8. The release name should match the tag name!
159+
9. Edit the resulting notes to ensure they have decent messaging that is understandable by non-contributors, but each commit should still have its own line.
160+
10. Set this release as a pre-release.
161+
11. Publish the release by clicking the "Publish release" button!
162+
3. Navigate to the [release workflow run](https://github.com/slackapi/python-slack-hooks/actions/workflows/pypi-release.yml). You will need to approve the deployment!
163+
4. After a few minutes, the corresponding version will be available on <https://pypi.org/project/slack-cli-hooks>.
164+
5. (Slack Internal) Communicate the release internally
188165
189166
#### Production Deployment
190167
191-
Deploying a new version of this library to Pypi is triggered by publishing a Github Release.
168+
Deploying a new version of this library to PyPI is triggered by publishing a GitHub Release.
192169
Before creating a new release, ensure that everything on the `main` branch since
193-
the last tag is in a releasable state! At a minimum,
194-
[run the tests](#run-all-the-unit-tests).
170+
the last tag is in a releasable state! At a minimum, [run the tests](#run-all-the-unit-tests).
195171
196172
1. Create the commit for the release
197-
- Bump the version number in adherence to
198-
[Semantic Versioning](http://semver.org/) in `slack_cli_hooks/version.py`
199-
- Commit with a message including the new version number. For example `1.2.3`
200-
& Push the commit to a branch and create a PR to sanity check.
201-
- `git checkout -b 1.2.3-release`
202-
- `git commit -m 'chore(release): tag version 1.2.3'`
203-
- `git push {your-fork} 1.2.3-release`
204-
- Add relevant labels to the PR and add the PR to a GitHub Milestone.
205-
- Merge in release PR after getting an approval from at least one maintainer.
206-
2. Create a new GitHub Release from the
207-
[Releases page](https://github.com/slackapi/python-slack-hooks/releases) by
208-
clicking the "Draft a new release" button.
209-
3. Input the version manually into the "Choose a tag" input. You must use the
210-
same version found in `slack_cli_hooks/version.py`
211-
212-
- After you input the version, click the "Create a new tag: x.x.x on publish"
213-
button. This won't create your tag immediately.
214-
- Click the "Auto-generate release notes" button. This will pull in changes
215-
that will be included in your release.
216-
- Edit the resulting notes to ensure they have decent messaging that are
217-
understandable by non-contributors, but each commit should still have it's
218-
own line.
219-
- Ensure that this version adheres to
220-
[semantic versioning](http://semver.org/). See
221-
[Versioning](#versioning-and-tags) for correct version format.
222-
223-
4. Set the "Target" input to the "main" branch.
224-
5. Name the release title after the version tag. It should match the updated
225-
value from `slack_cli_hooks/version.py`!
226-
6. Make any adjustments to generated release notes to make sure they are
227-
accessible and approachable and that an end-user with little context about
228-
this project could still understand.
229-
7. Publish the release by clicking the "Publish release" button!
230-
8. After a few minutes, the corresponding version will be available on
231-
<https://pypi.org/project/slack-cli-hooks/>.
232-
9. Close the current GitHub Milestone and create one for the next minor version.
233-
10. (Slack Internal) Communicate the release internally
173+
1. In `slack_cli_hooks/version.py` bump the version number in adherence to [Semantic Versioning](http://semver.org/) and the [Versioning](#versioning-and-tags) section.
174+
2. Commit with a message including the new version number. For example `1.2.3` & push the commit to a branch and create a PR to sanity check.
175+
1. `git checkout -b 1.2.3-release`
176+
2. `git commit -m 'chore(release): version 1.2.3'`
177+
3. `git push -u origin 1.2.3-release`
178+
3. Add relevant labels to the PR and add the PR to a GitHub Milestone.
179+
4. Merge in release PR after getting an approval from at least one maintainer.
180+
2. Create a new GitHub Release
181+
1. Navigate to the [Releases page](https://github.com/slackapi/python-slack-hooks/releases).
182+
2. Click the "Draft a new release" button.
183+
3. Set the "Target" to the `main` branch.
184+
4. Click "Tag: Select tag"
185+
5. Input a new tag name manually. The tag name must match the version in `slack_cli_hooks/version.py` prefixed with "v" (e.g., if version is `1.2.3`, enter `v1.2.3`)
186+
6. Click the "Create a new tag" button. This won't create your tag immediately.
187+
7. Click the "Generate release notes" button.
188+
8. The release name should match the tag name!
189+
9. Edit the resulting notes to ensure they have decent messaging that is understandable by non-contributors, but each commit should still have its own line.
190+
10. Include a link to the current GitHub Milestone.
191+
11. Ensure the "latest release" checkbox is checked to mark this as the latest stable release.
192+
12. Publish the release by clicking the "Publish release" button!
193+
3. Navigate to the [release workflow run](https://github.com/slackapi/python-slack-hooks/actions/workflows/pypi-release.yml). You will need to approve the deployment!
194+
4. After a few minutes, the corresponding version will be available on <https://pypi.org/project/slack-cli-hooks>.
195+
5. Close the current GitHub Milestone and create one for the next patch version.
196+
6. (Slack Internal) Communicate the release internally
234197
- Include a link to the GitHub release
235-
11. (Slack Internal) Tweet by @SlackAPI
198+
7. (Slack Internal) Tweet by @SlackAPI
236199
- Not necessary for patch updates, might be needed for minor updates,
237200
definitely needed for major updates. Include a link to the GitHub release
238201

239202
## Workflow
240203

241204
### Versioning and Tags
242205

243-
This project uses semantic versioning, expressed through the numbering scheme of
206+
This project uses [Semantic Versioning](http://semver.org/), expressed through the numbering scheme of
244207
[PEP-0440](https://www.python.org/dev/peps/pep-0440/).
245208

246209
### Branches

.github/workflows/pypi-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
name: release-dist
8282
path: dist/
8383

84-
- name: Publish release distributions to test.pypi.org
84+
- name: Publish release distributions to pypi.org
8585
# Using OIDC for PyPI publishing (no API tokens needed)
8686
# See: https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-pypi
8787
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

0 commit comments

Comments
 (0)