You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`push` to `release/v*` branches (release branch CI)
401
407
*`pull_request` to `main` (opened, synchronize, reopened)
402
408
*`release` created
403
409
*`tags` matching `v*.*.*`
@@ -415,7 +421,6 @@ Cancels in-progress runs when new commits are pushed to same PR/branch.
415
421
416
422
* Commit message contains `skip:ci`
417
423
* Commit message contains `build:native:only`
418
-
* Commit starts with `Bump version:`
419
424
* PR has label `skip:ci` or `build:native:only`
420
425
421
426
**Job Dependencies**:
@@ -1006,26 +1011,39 @@ make dist_native
1006
1011
1007
1012
### Releasing a Version
1008
1013
1009
-
1. Ensure `main` branch is clean and all tests pass
1010
-
2. Run version bump:
1014
+
Releases use a four-phase workflow triggered from the developer's machine via `gh workflow run`. This lets Ketryx compliance approvals be collected *before* the tag (and thus before publishing to PyPI).
1011
1015
1012
-
```bash
1013
-
make bump patch # or minor, major
1014
-
```
1016
+
**Phase 1 — Prepare the release branch** (triggers `prepare-release.yml`):
1015
1017
1016
-
3. This creates a commit and git tag
1017
-
4. Push with tags:
1018
+
```bash
1019
+
make prepare-release 1.2.3 # explicit version
1020
+
```
1021
+
1022
+
Creates `release/vX.Y.Z` from `main`, commits version bump + `uv.lock`, pushes. CI runs on the branch automatically.
1023
+
1024
+
**Phase 2 — Collect Ketryx approvals:**
1025
+
1026
+
Point the Ketryx release to `release/vX.Y.Z` and collect approvals. Ensure CI is green.
make publish-release # auto-detects release/v* branch
1032
+
make publish-release release/v1.2.3 # explicit branch
1033
+
```
1034
+
1035
+
Generates `CHANGELOG.md`, creates annotated `vX.Y.Z` tag, pushes → CI/CD fires on tag → Ketryx check must pass before PyPI publish.
1036
+
1037
+
**Phase 4 — Merge back to main** (triggers `merge-release.yml`):
1038
+
1039
+
```bash
1040
+
make merge-release # auto-detects release/v* branch
1041
+
make merge-release release/v1.2.3 # explicit branch
1042
+
```
1018
1043
1019
-
```bash
1020
-
git push --follow-tags
1021
-
```
1044
+
Merges `release/vX.Y.Z` into `main` with `--no-ff`, pushes `main`, deletes the release branch.
1022
1045
1023
-
5. CI detects tag and triggers:
1024
-
* Full CI pipeline (lint, audit, test, CodeQL)
1025
-
* Package build and publish to PyPI
1026
-
* Docker image build and publish
1027
-
* GitHub release creation
1028
-
* Slack notification to team
1046
+
**Note on branch protection**: `release/v*` branches should be protected so that only the GitHub Actions bot (`aignostics-release-bot[bot]`) can push to them. This enforces the server-side workflow. Configure in GitHub Settings → Branches → Branch protection rules.
1029
1047
1030
1048
### Manual Testing with Claude
1031
1049
@@ -1070,6 +1088,9 @@ make dist_native
1070
1088
| File | Type | Purpose | Duration |
1071
1089
|------|------|---------|----------|
1072
1090
| `ci-cd.yml` | Entry | Main pipeline orchestration | ~20 min |
1091
+
| `prepare-release.yml` | Entry | Create release branch + bump version | ~2 min |
0 commit comments