Skip to content

Commit bc4da14

Browse files
committed
chore(governance): update release steps
Signed-off-by: heitorlessa <[email protected]>
1 parent 75eb680 commit bc4da14

File tree

2 files changed

+25
-43
lines changed

2 files changed

+25
-43
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,20 @@ name: Publish to PyPi
44
#
55
# === Manual activities ===
66
#
7-
# 1. Document human readable changes in CHANGELOG (pre-generate unreleased changes with `make changelog`)
8-
# 2. Bump package version using poetry version <major|minor|patch|specific version>
9-
# 3. Merge version changes to develop branch
10-
# 4. Edit the current draft release notes
11-
# 5. If not already set, use `v<new version>` as a tag, and select develop as target branch
7+
# 1. Edit the current draft release notes
8+
# 2. If not already set, use `v<new version>` as a tag, e.g., v1.26.4, and select develop as target branch
129
#
1310
# === Automated activities ===
1411
#
1512
# 1. Extract release notes tag that was published
16-
# 2. Ensure release notes tag match what's in CHANGELOG and pyproject
17-
# 3. Run tests, linting, security and complexity base line
18-
# 4. Publish package to PyPi test repository
19-
# 5. Publish package to PyPi prod repository
20-
# 6. Kick off Lambda Layer pipeline to publish latest version with minimal dependencies as a SAR App
21-
# 7. Kick off Lambda Layer pipeline to publish latest version with extra dependencies as a SAR App
22-
# 8. Builds a fresh version of docs including Changelog updates
23-
# 9. Builds latest documentation for new release, and update latest alias pointing to the new release tag
24-
# 10. Close and notify all issues labeled "pending-release" about the release details
13+
# 2. Run tests, linting, security and complexity base line
14+
# 3. Bump package version and generate latest Changelog
15+
# 4. Publish package to PyPi test and prod repository
16+
# 5. Kick off SAR App pipeline to publish latest version with minimal and extra dependencies
17+
# 6. Builds a new user guide and API docs with release version; update /latest pointing to newly released version
18+
# 7. Close all issues labeled "pending-release" and notify customers about the release
2519

26-
#
27-
# === Fallback mechanism due to external failures ===
28-
#
29-
# 1. Trigger "Publish to PyPi" workflow manually: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
30-
# 2. Use the version released under Releases e.g. v1.13.0
31-
#
32-
33-
#
34-
# === Documentation hotfix ===
35-
#
36-
# Look for rebuild latest docs workflow
20+
# See MAINTAINERS.md "Releasing a new version" for release mechanisms
3721

3822
on:
3923
release:

MAINTAINERS.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,15 @@ Some examples using our initial and new RFC templates: #92, #94, #95, #991, #122
169169

170170
### Releasing a new version
171171

172-
> TODO: This is an area we want to increase automation while keeping communication at human level.
172+
Firstly, make sure the commit history in the `develop` branch **(1)** it's up to date, **(2)** commit messages are semantic, and **(3)** commit messages have their respective area, for example `feat(logger): <change>`, `chore(ci): ...`).
173173

174-
Firstly, make sure you are using the `develop` branch and it is up to date with the origin.
174+
**Found typos or unclear commit messages?**
175175

176-
There are three main steps to release a new version: Changelog generation, version bumping, and drafting release notes.
176+
Reword through rebase and push with `--force-with-lease` once you're confident. This will ensure [CHANGELOG](./CHANGELOG.md) is always clear for customers looking to understand what changed in between releases - was that a bug? what new features and for which utility?
177177

178-
#### Changelog generation
178+
**Looks good, what's next?**
179179

180-
You can pre-generate a temporary CHANGELOG using `make changelog`. This will generate a `TMP_CHANGELOG.md` with all staged changes under the `unreleased` section.
181-
182-
Each unreleased line item is a commit. You can adjust them if you find the commit titles are insufficient to describe their intent. Once you're comfortable, bring these changes to the `CHANGELOG.md` with a new version heading like in previous versions.
183-
184-
#### Bumping the version
185-
186-
Use `poetry version <major|minor|patch|specific version>` to bump the version. For example, you can use `poetry version minor` when releasing a minor version.
187-
188-
NOTE. Make sure both `CHANGELOG` and `pyproject.toml` are committed and pushed to the remote `develop` branch before proceeding.
180+
The only step is to draft and publish a good release notes, everything else is automated.
189181

190182
#### Drafting release notes
191183

@@ -195,21 +187,27 @@ Make sure the `tag` field reflects the new version you're releasing, the target
195187

196188
You'll notice we group all changes based on their [labels](#labels) like `feature`, `bug`, `documentation`, etc.
197189

198-
> **Q: What if there's an incorrect title or grouping?**
190+
**I spotted a typo or incorrect grouping - how do I fix it?**
199191

200192
Edit the respective PR title and update their [labels](#labels). Then run the [Release Drafter workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/release-drafter.yml) to update the Draft release.
201193

202-
The best part comes now. Replace the placeholder `[Human readable summary of changes]` with what you'd like to communicate to customers what this release is all about. Always put yourself in the customers shoes. For that, these are some questions to keep in mind when drafting your first or future release notes:
194+
**All looking good, what's next?**
195+
196+
The best part comes now. Replace the placeholder `[Human readable summary of changes]` with what you'd like to communicate to customers what this release is all about. Rule of thumb: always put yourself in the customers shoes.
197+
198+
These are some questions to keep in mind when drafting your first or future release notes:
203199

204200
- Can customers understand at a high level what changed in this release?
205201
- Is there a link to the documentation where they can read more about each main change?
206-
- Are there any graphics or code snippets that can enhance readability?
202+
- Are there any graphics or [code snippets](carbon.now.sh/) that can enhance readability?
207203
- Are we calling out any key contributor(s) to this release?
208204
- All contributors are automatically credited, use this as an exceptional case to feature them
209205

210-
Once you're happy, hit `Publish release`. This will kick off the [Publishing workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/publish.yml) and within a few minutes you should see the latest version in PyPi, and all issues labeled as `pending-release` will be notified.
206+
Once you're happy, hit `Publish release` 🎉🎉🎉.
207+
208+
This will kick off the [Publishing workflow](https://github.com/awslabs/aws-lambda-powertools-python/actions/workflows/publish.yml) and within a few minutes you should see the latest version in PyPi, and all issues labeled as `pending-release` will be closed and notified.
211209

212-
> TODO: Wait for @am29d new Lambda Layers pipeline work to complete, then add how Lambda Layers are published
210+
> TODO: Include information to verify SAR and Lambda Layers deployment; we're still finalizing Lambda Layer automated deployment in GitHub Actions - ping @am29d when in doubt.
213211
214212
### Releasing a documentation hotfix
215213

0 commit comments

Comments
 (0)