|
| 1 | +# Releasing |
| 2 | + |
| 3 | +This document describes how to cut a release for packages in this monorepo and how the automated PyPI publishing workflow is triggered. |
| 4 | + |
| 5 | +## Packages |
| 6 | + |
| 7 | +This monorepo contains the following packages: |
| 8 | + |
| 9 | +| Package | Path | Tag Prefix | |
| 10 | +|---------|------|------------| |
| 11 | +| `aws-durable-execution-sdk-python` | `packages/aws-durable-execution-sdk-python` | `sdk` | |
| 12 | +| `aws-durable-execution-sdk-python-otel` | `packages/aws-durable-execution-sdk-python-otel` | `otel` | |
| 13 | + |
| 14 | +## Versioning |
| 15 | + |
| 16 | +Each package maintains its own version in its respective `__about__.py` file: |
| 17 | + |
| 18 | +- SDK: `packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python/__about__.py` |
| 19 | +- OTel: `packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel/__about__.py` |
| 20 | + |
| 21 | +Bump the version in the appropriate `__about__.py` file(s) and merge to `main` before creating a release. |
| 22 | + |
| 23 | +## Cutting a Release |
| 24 | + |
| 25 | +### 1. Bump the version |
| 26 | + |
| 27 | +Update the `__version__` string in the relevant `__about__.py` file(s). Commit and merge to `main`. |
| 28 | + |
| 29 | +### 2. Create a GitHub Release |
| 30 | + |
| 31 | +1. Go to the [Releases page](https://github.com/aws/aws-durable-execution-sdk-python/releases) on GitHub. |
| 32 | +2. Click **Draft a new release**. |
| 33 | +3. Create a new tag following the tagging convention below. |
| 34 | +4. Set the release title (typically the same as the tag). |
| 35 | +5. Write release notes following the format described in [Release Notes Format](#release-notes-format). |
| 36 | +6. Click **Publish release**. |
| 37 | + |
| 38 | +### Tagging Convention |
| 39 | + |
| 40 | +The tag should be the version of the package being bumped, prepended with a descriptive prefix: |
| 41 | + |
| 42 | +- **SDK only:** `sdk-v<version>` (e.g., `sdk-v1.6.0`) |
| 43 | +- **OTel only:** `otel-v<version>` (e.g., `otel-v0.3.0`) |
| 44 | +- **Both packages in a single release:** comma-separate the sub-tags (e.g., `sdk-1.6.0,otel-0.3.0`) |
| 45 | + |
| 46 | +Examples: |
| 47 | + |
| 48 | +``` |
| 49 | +sdk-1.6.0 |
| 50 | +otel-0.3.0 |
| 51 | +sdk-1.6.0,otel-0.3.0 |
| 52 | +``` |
| 53 | + |
| 54 | +If additional packages are added to the monorepo in the future, follow the same pattern: choose a short descriptive prefix for the package and use `<prefix>-<version>`. |
| 55 | + |
| 56 | +## How Publishing Works |
| 57 | + |
| 58 | +Creating a GitHub Release triggers the [`pypi-publish.yml`](.github/workflows/pypi-publish.yml) workflow automatically. The workflow: |
| 59 | + |
| 60 | +1. **Builds** both packages using [Hatch](https://hatch.pypa.io/) (`hatch build`). |
| 61 | +2. **Uploads** the built distributions as artifacts. |
| 62 | +3. **Publishes** each package to [PyPI](https://pypi.org/) using trusted publishing (OIDC-based, no API tokens required). |
| 63 | + |
| 64 | +The workflow runs on the `release: [published]` event, so it fires whenever a release is published on GitHub — no manual intervention is needed beyond creating the release. |
| 65 | + |
| 66 | +> **Note:** The workflow builds and publishes all packages in the matrix. Ensure the version in each package's `__about__.py` is correct before publishing. If only one package has a version bump, PyPI will reject the re-upload of the unchanged package (which is expected and harmless since `fail-fast: false` is set). |
| 67 | +
|
| 68 | +## Release Notes Format |
| 69 | + |
| 70 | +Release notes should maintain separate timelines for each package. Use the following structure: |
| 71 | + |
| 72 | +```markdown |
| 73 | +## aws-durable-execution-sdk-python v1.6.0 |
| 74 | + |
| 75 | +### Features |
| 76 | +- Added support for X |
| 77 | +- New `context.foo()` API |
| 78 | + |
| 79 | +### Bug Fixes |
| 80 | +- Fixed issue with Y under Z conditions |
| 81 | + |
| 82 | +### Breaking Changes |
| 83 | +- Removed deprecated `bar()` method |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## aws-durable-execution-sdk-python-otel v0.3.0 |
| 88 | + |
| 89 | +### Features |
| 90 | +- Added tracing for `map` operations |
| 91 | + |
| 92 | +### Bug Fixes |
| 93 | +- Fixed span context propagation in child contexts |
| 94 | +``` |
| 95 | + |
| 96 | +If only one package is being released, include only that package's section. Each package's changelog should be self-contained so users can follow the history of the package they depend on independently. |
| 97 | + |
| 98 | +## Checklist |
| 99 | + |
| 100 | +Before publishing a release: |
| 101 | + |
| 102 | +- [ ] Version bumped in the relevant `__about__.py` file(s) |
| 103 | +- [ ] Changes merged to `main` |
| 104 | +- [ ] CI checks pass on `main` |
| 105 | +- [ ] Release notes written with separate sections per package |
| 106 | +- [ ] Tag follows the naming convention (`sdk-X.Y.Z`, `otel-X.Y.Z`, or comma-separated) |
0 commit comments