Skip to content

Commit 4d40fc7

Browse files
mkumar73Copilot
andcommitted
docs: rc update and fix
Co-authored-by: Copilot <copilot@github.com>
1 parent 139c653 commit 4d40fc7

1 file changed

Lines changed: 47 additions & 35 deletions

File tree

docs/developer_guide/release.md

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,33 @@ The document outlines the steps to build and release the `deeptab` package. At t
1515
'edgeLabelBackground': '#f9fafb'
1616
}}}%%
1717
flowchart TD
18-
A[Create release/vX.Y.Z branch]:::setup --> B[Bump version]:::setup
19-
B --> C[Update CHANGELOG.md]:::setup
20-
C --> D[Commit & push branch]:::setup
21-
D --> E[Open PR: release/vX.Y.Z → main]:::pr
22-
E --> F{Review & approve}:::decision
23-
F --> G[Merge PR into main]:::pr
24-
G --> H[git checkout main && git pull]:::git
25-
H --> I{Release type?}:::decision
26-
I -->|RC| J["git tag vX.Y.ZrcN\ngit push origin vX.Y.ZrcN"]:::git
27-
I -->|Stable| K["git tag vX.Y.Z\ngit push origin vX.Y.Z"]:::git
28-
J --> L[CI: publish-testpypi.yml]:::ci
29-
K --> M[CI: publish-pypi.yml]:::ci
30-
L --> N[TestPyPI + GitHub pre-release]:::rc
31-
M --> O[PyPI + GitHub Release]:::stable
32-
33-
classDef setup fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f
34-
classDef pr fill:#ede9fe,stroke:#8b5cf6,color:#3b0764
18+
A[Create release/vX.Y.Z branch]:::setup --> B{Release type?}:::decision
19+
B -->|RC| RC1[Bump version e.g. 1.7.0rc1]:::setup
20+
B -->|Stable| ST1[Bump version e.g. 1.7.0]:::setup
21+
RC1 --> RC2[Update CHANGELOG.md]:::setup
22+
RC2 --> RC3[Commit & push branch]:::setup
23+
RC3 --> RC4["git tag vX.Y.ZrcN\ngit push origin vX.Y.ZrcN"]:::git
24+
RC4 --> RC5[CI: publish-testpypi.yml]:::ci
25+
RC5 --> RC6[TestPyPI + GitHub pre-release]:::rc
26+
RC6 -->|Issues found| RC1
27+
RC6 -->|RC approved| ST1
28+
ST1 --> ST2[Update CHANGELOG.md]:::setup
29+
ST2 --> ST3[Commit & push branch]:::setup
30+
ST3 --> ST4[Open PR: release/vX.Y.Z → main]:::pr
31+
ST4 --> ST5{Review & approve}:::decision
32+
ST5 --> ST6[Merge PR into main]:::pr
33+
ST6 --> ST7[git checkout main && git pull]:::git
34+
ST7 --> ST8["git tag vX.Y.Z\ngit push origin vX.Y.Z"]:::git
35+
ST8 --> ST9[CI: publish-pypi.yml]:::ci
36+
ST9 --> ST10[PyPI + GitHub Release]:::stable
37+
38+
classDef setup fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f
39+
classDef pr fill:#ede9fe,stroke:#8b5cf6,color:#3b0764
3540
classDef decision fill:#fef9c3,stroke:#ca8a04,color:#713f12
36-
classDef git fill:#f0fdf4,stroke:#22c55e,color:#14532d
37-
classDef ci fill:#fff7ed,stroke:#f97316,color:#7c2d12
38-
classDef rc fill:#fdf4ff,stroke:#d946ef,color:#701a75
39-
classDef stable fill:#ecfdf5,stroke:#10b981,color:#064e3b
41+
classDef git fill:#f0fdf4,stroke:#22c55e,color:#14532d
42+
classDef ci fill:#fff7ed,stroke:#f97316,color:#7c2d12
43+
classDef rc fill:#fdf4ff,stroke:#d946ef,color:#701a75
44+
classDef stable fill:#ecfdf5,stroke:#10b981,color:#064e3b
4045
```
4146

4247
## 1. Test documentation
@@ -86,37 +91,44 @@ git commit -m "bump: version 1.6.1 → 1.7.0rc1"
8691

8792
The version number follows the format `major.minor.patch` for stable, or `major.minor.patchrcN` for release candidates.
8893

89-
## 3. Release PR
94+
## 3. Tag and publish a release candidate
95+
96+
RC tags are pushed **directly from the release branch** — no PR to `main` required.
97+
98+
```bash
99+
git tag -a vX.Y.ZrcN -m "Release candidate vX.Y.ZrcN"
100+
git push origin vX.Y.ZrcN
101+
```
102+
103+
This triggers `publish-testpypi.yml`, which publishes to **TestPyPI** and creates a GitHub pre-release.
104+
105+
If issues are found, fix them on the release branch, bump to the next RC (`rcN+1`), and repeat.
106+
107+
## 4. Release PR (stable only)
108+
109+
Once all RCs are approved, open a PR from `release/vX.Y.Z` to `main`:
90110

91-
- Open a PR from `release/vX.Y.Z` to `main`
92111
- After review and approval, merge the PR
93112
- **Merging to `main` does NOT trigger a PyPI release**
94113

95114
> **Promoting a model from experimental to stable?** Verify the [Model Promotion Policy](model_promotion_policy.md) checklist is complete before merging a release PR that includes a promotion.
96115
97-
## 4. Create and push the Git tag
116+
## 5. Create and push the stable tag
98117

99-
After the release PR is merged, the maintainer creates the release tag:
118+
After the release PR is merged:
100119

101120
```bash
102121
git checkout main && git pull
103122
git tag -a vX.Y.Z -m "Release vX.Y.Z"
104123
git push origin vX.Y.Z
105124
```
106125

107-
For a release candidate:
108-
109-
```bash
110-
git tag -a vX.Y.Zrc1 -m "Release candidate vX.Y.Zrc1"
111-
git push origin vX.Y.Zrc1
112-
```
113-
114-
## 5. Publish package to PyPI
126+
## 6. Publish package to PyPI
115127

116128
The tag push automatically triggers the appropriate workflow in GitHub Actions:
117129

118130
- Stable tag (`vX.Y.Z`) → `publish-pypi.yml` → publishes to **PyPI** + creates GitHub Release
119-
- RC tag (`vX.Y.Zrc1`) → `publish-testpypi.yml` → publishes to **TestPyPI** + creates GitHub pre-release
131+
- RC tag (`vX.Y.ZrcN`) → `publish-testpypi.yml` → publishes to **TestPyPI** + creates GitHub pre-release
120132

121133
Both workflows:
122134

@@ -127,6 +139,6 @@ Both workflows:
127139

128140
> **Note:** A `pypi-publish` GitHub Environment (for stable) and `testpypi-publish` environment (for RCs) must be configured with tag-based deployment protection rules.
129141
130-
## 6. GitHub Release
142+
## 7. GitHub Release
131143

132144
The GitHub Release is created automatically by the publish workflow. Verify the release notes are correct and add any manual context if needed.

0 commit comments

Comments
 (0)