Skip to content

Commit

Permalink
Tweak the instructions per Matrix chat.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Mar 22, 2024
1 parent 36a69a7 commit 6118b1b
Showing 1 changed file with 34 additions and 15 deletions.
49 changes: 34 additions & 15 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ indicating changes or additions across versions - we encourage all charmers to
promptly upgrade to the latest version of ops, and to refer to the release notes
and changelog for learning about changes.

Changes should also get a new entry in [CHANGES.md](CHANGES.md). These are
grouped into the same groupings as
During the release process, changes also get a new entry in [CHANGES.md](CHANGES.md).
These are grouped into the same groupings as
[commit messages](https://www.conventionalcommits.org/en/)
(feature, fix, documentation, performance, etc). The only exceptions are changes
that are not visible to the built releases, such as CI workflow changes, or are
Expand Down Expand Up @@ -234,23 +234,42 @@ the build frontend is [build](https://pypi.org/project/build/).

To make a release of the ops library, do the following:

1. Open a PR to change [version.py][ops/version.py]'s `version` to the
[appropriate string](https://semver.org/), and get that merged to main.
2. Visit the [releases page on GitHub](https://github.com/canonical/operator/releases).
3. Click "Draft a new release"
4. The "Release Title" is simply the full version number, in the form <major>.<minor>.<patch>
1. Visit the [releases page on GitHub](https://github.com/canonical/operator/releases).
2. Click "Draft a new release"
3. The "Release Title" is simply the full version number, in the form <major>.<minor>.<patch>
and a brief summary of the main changes in the release
E.g. 2.3.12 Bug fixes for the Juju foobar feature when using Python 3.12
5. Drop notes and a changelog in the description.
6. When you are ready, click "Publish". (If you are not ready, click "Save as Draft".) Wait for the new version to be published successfully to [the PyPI project](https://pypi.org/project/ops/).
7. Open a PR to change [version.py][ops/version.py]'s `version` to the expected
next version, with "+dev" appended (for example, if 3.14.1 is the next expected version, use
`'3.14.1.dev0'`).

This will trigger an automatic build for the Python package and publish it to PyPI (authorization is handled via a [Trusted Publisher](https://docs.pypi.org/trusted-publishers/) relationship).
4. Use the "Generate Release Notes" button to get a copy of the changes into the
notes field.
5. Group the changes by the commit type (feat, fix, etc), stripping that prefix
from the bullet point, and using the full name ("Features", not "feat") for
the group heading.
6. Where appropriate, collapse multiple tightly related bullet points into a
single point that refers to multiple commits.
7. Create a new branch, and copy this text to the [CHANGES.md](CHANGES.md) file,
stripping out links, who did each commit, the new contributor list, and the
link to the full changelog.
8. Change [version.py][ops/version.py]'s `version` to the
[appropriate string](https://semver.org/).
9. Add, commit, and push, and open a PR to get the changelog and version bump
into main (and get it merged).
10. Back in the GitHub releases page, tweak the release notes - for example,
you might want to have a short paragraph at the intro on particularly
noteworthy changes.
11. Have someone else in the Charm-Tech team proofread the release notes.
12. When you are ready, click "Publish". (If you are not ready, click "Save as Draft".)

This will trigger an automatic build for the Python package and publish it to
[PyPI](https://pypi.org/project/ops/)) (authorisation is handled via a
[Trusted Publisher](https://docs.pypi.org/trusted-publishers/) relationship).
Note that it sometimes take a bit of time for the new release to show up.

See [.github/workflows/publish.yml](.github/workflows/publish.yml) for details. (Note that the versions in publish.yml refer to versions of the GitHub actions, not the versions of the ops library.)

You can troubleshoot errors on the [Actions Tab](https://github.com/canonical/operator/actions).

Announce the release on [Discourse](https://discourse.charmhub.io/c/framework/42) and [Matrix](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
13. Announce the release on [Discourse](https://discourse.charmhub.io/c/framework/42) and [Matrix](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)

14. Open a PR to change [version.py][ops/version.py]'s `version` to the expected
next version, with "+dev" appended (for example, if 3.14.1 is the next expected version, use
`'3.14.1.dev0'`).

0 comments on commit 6118b1b

Please sign in to comment.