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
408
*`pull_request` to `main` (opened, synchronize, reopened)
402
409
*`release` created
403
410
*`tags` matching `v*.*.*`
@@ -415,7 +422,7 @@ Cancels in-progress runs when new commits are pushed to same PR/branch.
415
422
416
423
* Commit message contains `skip:ci`
417
424
* Commit message contains `build:native:only`
418
-
* Commit starts with `Bump version:`
425
+
* Commit starts with `Bump version:` **on the `main` branch only** (on `release/v*` branches the bump commit intentionally runs CI)
419
426
* PR has label `skip:ci` or `build:native:only`
420
427
421
428
**Job Dependencies**:
@@ -1006,26 +1013,42 @@ make dist_native
1006
1013
1007
1014
### Releasing a Version
1008
1015
1009
-
1. Ensure `main` branch is clean and all tests pass
1010
-
2. Run version bump:
1016
+
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
1017
1012
-
```bash
1013
-
make bump patch # or minor, major
1014
-
```
1018
+
**Phase 1 — Prepare the release branch** (triggers `prepare-release.yml`):
1015
1019
1016
-
3. This creates a commit and git tag
1017
-
4. Push with tags:
1020
+
```bash
1021
+
make prepare-release patch # 1.0.0 → 1.0.1
1022
+
make prepare-release minor # 1.0.0 → 1.1.0
1023
+
make prepare-release major # 1.0.0 → 2.0.0
1024
+
make prepare-release 1.2.3 # explicit version
1025
+
```
1026
+
1027
+
Creates `release/vX.Y.Z` from `main`, commits version bump + `uv.lock`, pushes. CI runs on the branch automatically.
1028
+
1029
+
**Phase 2 — Collect Ketryx approvals:**
1030
+
1031
+
Point the Ketryx release to `release/vX.Y.Z` and collect approvals. Ensure CI is green.
make publish-release # auto-detects release/v* branch
1037
+
make publish-release release/v1.2.3 # explicit branch
1038
+
```
1039
+
1040
+
Generates `CHANGELOG.md`, creates annotated `vX.Y.Z` tag, pushes → CI/CD fires on tag → Ketryx check must pass before PyPI publish.
1041
+
1042
+
**Phase 4 — Merge back to main** (triggers `merge-release.yml`):
1043
+
1044
+
```bash
1045
+
make merge-release # auto-detects release/v* branch
1046
+
make merge-release release/v1.2.3 # explicit branch
1047
+
```
1018
1048
1019
-
```bash
1020
-
git push --follow-tags
1021
-
```
1049
+
Merges `release/vX.Y.Z` into `main` with `--no-ff`, pushes `main`, deletes the release branch.
1022
1050
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
1051
+
**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
1052
1030
1053
### Manual Testing with Claude
1031
1054
@@ -1070,6 +1093,9 @@ make dist_native
1070
1093
| File | Type | Purpose | Duration |
1071
1094
|------|------|---------|----------|
1072
1095
| `ci-cd.yml` | Entry | Main pipeline orchestration | ~20 min |
1096
+
| `prepare-release.yml` | Entry | Create release branch + bump version | ~2 min |
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+28-7Lines changed: 28 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,17 +124,38 @@ Notes:
124
124
125
125
### Publish Release
126
126
127
+
Releases follow a four-phase workflow that allows Ketryx compliance approvals to be collected before publishing:
128
+
129
+
**Phase 1 — Create the release branch:**
130
+
127
131
```shell
128
-
make bump # Patch release
129
-
make minor # Patch release
130
-
make major # Patch release
131
-
make x.y.z # Targeted release
132
+
make prepare-release patch # 1.0.0 → 1.0.1
133
+
make prepare-release minor # 1.0.0 → 1.1.0
134
+
make prepare-release major # 1.0.0 → 2.0.0
135
+
make prepare-release 1.2.3 # explicit version
132
136
```
133
137
134
-
Notes:
138
+
This triggers a GitHub Actions workflow that creates `release/vX.Y.Z` from `main`, bumps version files, and pushes the branch. CI runs automatically on the branch.
139
+
140
+
**Phase 2 — Collect Ketryx approvals:**
141
+
142
+
Point the Ketryx release to the `release/vX.Y.Z` branch and collect required approvals.
143
+
144
+
**Phase 3 — Publish (tag → PyPI):**
145
+
146
+
```shell
147
+
make publish-release
148
+
```
149
+
150
+
Generates `CHANGELOG.md`, creates the `vX.Y.Z` tag, and pushes — triggering CI/CD which publishes to PyPI, Docker registries, and creates a GitHub release (Ketryx check must pass first).
151
+
152
+
**Phase 4 — Merge back to main:**
153
+
154
+
```shell
155
+
make merge-release
156
+
```
135
157
136
-
1. Changelog generated automatically
137
-
2. Publishes to PyPi, Docker Registries, Read The Docs, Streamlit and Auditing services
158
+
Merges the release branch into `main` with `--no-ff` and deletes the branch.
0 commit comments