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
description: Use before creating any commit intended for release — determines correct version bump, ensures commit prefix is right, and walks through the release flow. Triggers on "release", "bump version", "merge to staging", "merge to main", "create a release", "what version will this be", or any PR from a feature branch to staging or main.
4
+
---
5
+
6
+
# CLI Release Skill
7
+
8
+
Use this skill **before writing the commit message** for any change headed to production.
9
+
Getting the prefix wrong means the wrong version ships — and fixing it requires an amended force-push.
10
+
11
+
---
12
+
13
+
## Step 1: Determine the correct version bump
14
+
15
+
1. Check the current published tag:
16
+
```bash
17
+
git fetch origin --tags
18
+
git describe --tags --abbrev=0
19
+
```
20
+
21
+
2. Examine commits since that tag on your branch:
22
+
```bash
23
+
git log <last-tag>..HEAD --oneline
24
+
```
25
+
26
+
3. Apply the bump rules (highest wins):
27
+
| Commit prefix | Bump |
28
+
|---|---|
29
+
|`feat:`|**minor** — X.(Y+1).0 |
30
+
|`fix:`|**patch** — X.Y.(Z+1) |
31
+
|`chore:`, `docs:`, other | no bump (don't use for deliverable changes) |
32
+
33
+
4.**State the expected version out loud** before any commit:
34
+
> "This will produce **1.20.1** because all commits use `fix:` (no `feat:`)."
35
+
36
+
---
37
+
38
+
## Step 2: Craft the commit message
39
+
40
+
- Use `fix:` for bug fixes, `feat:` for new features.
41
+
- If the prefix and bump disagree, add an explicit keyword override:
42
+
-`#patch` — force patch regardless of prefix
43
+
-`#minor` — force minor regardless of prefix
44
+
-`#major` — force major (rare)
45
+
-**Only use `feat:`/`fix:` for commits that touch deliverable paths**: `cortexapps_cli/`, `pyproject.toml`, `poetry.lock`, `tests/`, `docker/`. Use `chore:` for anything else.
46
+
47
+
Example:
48
+
```
49
+
fix: two-pass re-import for catalog entities with x-cortex-relationships #patch
50
+
```
51
+
52
+
---
53
+
54
+
## Step 3: Choose the release path
55
+
56
+
**Two valid paths — pick based on whether you're batching fixes:**
## Step 4: Monitor PR CI and auto-merge (no human in the loop)
102
+
103
+
CI takes ~5 minutes. Use this polling loop — it waits 5 minutes before the first check, then polls every 60 seconds. This keeps API calls to a minimum.
**Critically: do NOT add any commits during or after this loop.** The publish workflow auto-commits `chore: update HISTORY.md for main` after merging. That commit is excluded from the `paths:` trigger filter (`HISTORY.md` is not in `cortexapps_cli/**`, `docker/**`, `pyproject.toml`, or `poetry.lock`), so it will **not** trigger a second publish run. Any commit you push that *does* touch those paths will trigger a new, unwanted build.
123
+
124
+
---
125
+
126
+
## Step 5: Monitor the publish workflow after merge
127
+
128
+
The publish workflow runs 5 parallel jobs under the same `GH_TOKEN` PAT:
DONE=$(gh run list --limit 1 --branch main --json status --jq '.[0].status')
140
+
[ "$DONE"="completed" ] &&break
141
+
sleep 60
142
+
done
143
+
# Check final result
144
+
gh run list --limit 1 --branch main --json conclusion --jq '.[0].conclusion'
145
+
```
146
+
147
+
**If a job fails with a rate limit error — do NOT push a new commit.** Re-run only the failed jobs:
148
+
```bash
149
+
gh run rerun --failed <run-id>
150
+
```
151
+
152
+
**Confirm the tag was cut after a successful run:**
153
+
```bash
154
+
git fetch origin --tags && git tag --sort=-version:refname | head -3
155
+
```
156
+
157
+
---
158
+
159
+
## Step 5: Homebrew dependency caveat
160
+
161
+
`mislav/bump-homebrew-formula-action`**cannot** update `resource` blocks for Python dependencies.
162
+
If `pyproject.toml` or `poetry.lock` changed dependency versions, manually update `cortexapps/homebrew-tap/Formula/cortexapps-cli.rb` resource blocks after release.
0 commit comments