|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This document describes how releases are managed for `dns-benchmark-tool`. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Workflow Overview |
| 8 | + |
| 9 | +1. **Create a release branch** |
| 10 | + - From `main`, create a branch named `release/x.y.z`. |
| 11 | + - Example: `release/0.2.1`. |
| 12 | + |
| 13 | +2. **Make changes** |
| 14 | + - Update `pyproject.toml` and `src/dns_benchmark/__init__.py` with the new version. |
| 15 | + - Update changelog or documentation as needed. |
| 16 | + - Commit changes with **signed commits**. |
| 17 | + |
| 18 | +3. **Push the branch** |
| 19 | + |
| 20 | + ```bash |
| 21 | + git push origin release/x.y.z |
| 22 | + ``` |
| 23 | + |
| 24 | +4. **Open a Pull Request** |
| 25 | + - Target branch: `main`. |
| 26 | + - CI must pass before merge. |
| 27 | + - Branch protection rules apply (signed commits, tests, etc.). |
| 28 | + |
| 29 | +5. **Merge the PR** |
| 30 | + - Once stable, merge `release/x.y.z` into `main`. |
| 31 | + - At this point, `main` reflects the new version. |
| 32 | + |
| 33 | +6. **Tag the release** |
| 34 | + |
| 35 | + - After merging, create and push a tag on `main`: |
| 36 | + |
| 37 | + ```bash |
| 38 | + git checkout main |
| 39 | + git pull origin main |
| 40 | + git tag vX.Y.Z |
| 41 | + git push origin vX.Y.Z |
| 42 | + ``` |
| 43 | + |
| 44 | + - Example: `v0.2.1`. |
| 45 | + |
| 46 | +7. **Publish** |
| 47 | + - GitHub Actions sees the tag and publishes the package to PyPI. |
| 48 | + - Verify the new version is available on PyPI. |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Notes |
| 53 | + |
| 54 | +- **Do not push tags from release branches.** Tags should only be created on `main` after the PR is merged. |
| 55 | +- **One tag per version.** PyPI does not allow re‑uploads of the same version. |
| 56 | +- **Iterate freely** on the release branch until you are satisfied, then merge and tag. |
| 57 | +- **Only the maintainer** (with write access) should create and push release tags. |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## Hotfixes |
| 62 | + |
| 63 | +For urgent bug fixes: |
| 64 | + |
| 65 | +- Create a new branch from `main` named `release/x.y.z` (next patch version). |
| 66 | +- Apply the fix, commit, and push. |
| 67 | +- Open a PR into `main`, merge once CI passes. |
| 68 | +- Tag the merge commit (`vX.Y.Z`) to publish the hotfix. |
0 commit comments