Release skill
This skill automates the release process for the Optique project. There are
two types of releases: patch releases and major/minor releases.
Prerequisites
Before starting any release:
Verify the remote repository name:
git remote -v
Use the correct remote name (usually origin or upstream) in all push
commands.
Ensure you're on the correct branch and it's up to date.
Run tests to ensure everything passes:
mise test
mise check
Patch releases
Patch releases (e.g., 1.2.3) are for bug fixes and small improvements.
They are created from X.Y-maintenance branches.
Step 1: prepare the release
Check out the maintenance branch:
git checkout 1.2-maintenance
git pull
Update CHANGES.md: Find the section for the version being released and
change “To be released.” to “Released on {Month} {Day}, {Year}.” using
the current date in English. For example:
Version 1.2.3
-------------
Released on January 5, 2026.
Commit the changes:
git add CHANGES.md
git commit -m "Release 1.2.3"
Create the tag (without v prefix). Always use -m to provide a tag
message to avoid opening an editor for GPG-signed tags:
git tag -m "Optique 1.2.3" 1.2.3
Step 2: prepare next version
Add a new section at the top of CHANGES.md for the next patch version:
Version 1.2.4
-------------
To be released.
Version 1.2.3
-------------
Released on January 5, 2026.
Bump the version in packages/core/deno.json:
Change "version": "1.2.3" to "version": "1.2.4".
Run the version sync script:
mise check-versions --fix
Commit the version bump:
git add -A
git commit -m "Version bump
[ci skip]"
Step 3: push
Push the tag and branch to the remote:
git push origin 1.2.3 1.2-maintenance
Step 4: cascade merges
After creating a patch release, you must merge it forward to newer maintenance
branches and eventually to main.
Check if a newer maintenance branch exists (e.g., 1.3-maintenance):
git branch -a | grep maintenance
If a newer maintenance branch exists:
Check out the newer branch and merge the tag:
git checkout 1.3-maintenance
git merge 1.2.3
Resolve any conflicts (commonly in CHANGES.md, deno.json, and
package.json files).
Copy changelog entries: After resolving conflicts, copy the
changelog entries from the merged tag's version into the current
branch's unreleased version section. The entries should be:
- Grouped by package (e.g.,
### @optique/core, ### @optique/run)
- Inserted above any existing entries in each package section
- Issue/PR reference definitions (e.g.,
[#123]: ...) should not
be duplicated if they already exist
For example, if merging 1.2.3 into 1.3-maintenance where 1.3.2 is
pending:
Before (1.3-maintenance):
Version 1.3.2
-------------
To be released.
### @optique/run
- Added new logging features. [[#125]]
[#125]: https://github.com/dahlia/optique/issues/125
Merged tag 1.2.3 contains:
Version 1.2.3
-------------
Released on January 6, 2026.
### @optique/run
- Fixed a crash on startup. [[#123]]
[#123]: https://github.com/dahlia/optique/issues/123
After (1.3-maintenance):
Version 1.3.2
-------------
To be released.
### @optique/run
- Fixed a crash on startup. [[#123]]
- Added new logging features. [[#125]]
[#123]: https://github.com/dahlia/optique/issues/123
[#125]: https://github.com/dahlia/optique/issues/125
Run tests to verify:
mise test
mise check
Complete the merge commit (use default message).
Create a new patch release for this branch by repeating Steps 1-3
for version 1.3.x (e.g., 1.3.1).
Continue cascading to even newer maintenance branches if they exist.
If no newer maintenance branch exists, merge to main:
git checkout main
git merge 1.2.3 # or the last tag you created (e.g., 1.3.1)
Resolve conflicts, run tests, and push:
mise test
mise check
git push origin main
[!IMPORTANT]
Do not copy changelog entries to main. The main branch tracks
the next major/minor release, so patch release entries should not be
duplicated there. Just resolve conflicts and keep the existing
unreleased section as-is.
Major/minor releases
Major/minor releases (e.g., 1.3.0, 2.0.0) introduce new features or breaking
changes. They are always created from the main branch with patch version 0.
Step 1: prepare the release on main
Check out and update main:
git checkout main
git pull
Update CHANGES.md: Find the section for the version being released and
change “To be released.” to “Released on {Month} {Day}, {Year}.” using
the current date in English. For example:
Version 1.3.0
-------------
Released on January 5, 2026.
Commit the changes:
git add CHANGES.md
git commit -m "Release 1.3.0"
Create the tag (without v prefix). Always use -m to provide a tag
message to avoid opening an editor for GPG-signed tags:
git tag -m "Optique 1.3.0" 1.3.0
Step 2: prepare next version on main
Add a new section at the top of CHANGES.md for the next minor version:
Version 1.4.0
-------------
To be released.
Version 1.3.0
-------------
Released on January 5, 2026.
Bump the version in packages/core/deno.json:
Change "version": "1.3.0" to "version": "1.4.0".
Run the version sync script:
mise check-versions --fix
Commit the version bump:
git add -A
git commit -m "Version bump
[ci skip]"
Step 3: push main and tag
git push origin 1.3.0 main
Step 4: create maintenance branch
Create the maintenance branch from the release tag:
git branch 1.3-maintenance 1.3.0
Check out the maintenance branch:
git checkout 1.3-maintenance
Add a section for the first patch version in CHANGES.md:
Version 1.3.1
-------------
To be released.
Version 1.3.0
-------------
Released on January 5, 2026.
Bump the version in packages/core/deno.json:
Change "version": "1.3.0" to "version": "1.3.1".
Run the version sync script:
mise check-versions --fix
Commit the version bump:
git add -A
git commit -m "Version bump
[ci skip]"
Push the maintenance branch:
git push origin 1.3-maintenance
Version format reference
- Patch releases:
X.Y.Z where Z > 0 (e.g., 1.2.3, 1.2.4)
- Minor releases:
X.Y.0 (e.g., 1.3.0, 1.4.0)
- Major releases:
X.0.0 (e.g., 2.0.0, 3.0.0)
- Maintenance branches:
X.Y-maintenance (e.g., 1.2-maintenance)
- Tags: No
v prefix (e.g., 1.2.3, not v1.2.3)
- Tag messages:
Optique X.Y.Z format (use -m flag to avoid editor)
CHANGES.md format
Each version section follows this format:
Version X.Y.Z
-------------
Released on {Month} {Day}, {Year}.
### @optique/core
- Change description. [[#123]]
### @optique/run
- Change description.
[#123]: https://github.com/dahlia/optique/issues/123
For unreleased versions:
Version X.Y.Z
-------------
To be released.
Checklist summary
Patch release checklist
Major/minor release checklist
Source: dahlia/optique — distributed by TomeVault.
1---2name: dahlia-optique-optique3description: Release skill4---56Release skill7=============89This skill automates the release process for the Optique project. There are10two types of releases: patch releases and major/minor releases.111213Prerequisites14-------------1516Before starting any release:17181. Verify the remote repository name:1920 ~~~~ bash21 git remote -v22 ~~~~2324 Use the correct remote name (usually `origin` or `upstream`) in all push25 commands.26272. Ensure you're on the correct branch and it's up to date.28293. Run tests to ensure everything passes:3031 ~~~~ bash32 mise test33 mise check34 ~~~~353637Patch releases38--------------3940Patch releases (e.g., 1.2.3) are for bug fixes and small improvements.41They are created from `X.Y-maintenance` branches.4243### Step 1: prepare the release44451. Check out the maintenance branch:4647 ~~~~ bash48 git checkout 1.2-maintenance49 git pull50 ~~~~51522. Update *CHANGES.md*: Find the section for the version being released and53 change “To be released.” to “Released on {Month} {Day}, {Year}.” using54 the current date in English. For example:5556 ~~~~ markdown57 Version 1.2.358 -------------5960 Released on January 5, 2026.61 ~~~~62633. Commit the changes:6465 ~~~~ bash66 git add CHANGES.md67 git commit -m "Release 1.2.3"68 ~~~~69704. Create the tag (without `v` prefix). Always use `-m` to provide a tag71 message to avoid opening an editor for GPG-signed tags:7273 ~~~~ bash74 git tag -m "Optique 1.2.3" 1.2.375 ~~~~7677### Step 2: prepare next version78791. Add a new section at the top of *CHANGES.md* for the next patch version:8081 ~~~~ markdown82 Version 1.2.483 -------------8485 To be released.868788 Version 1.2.389 -------------9091 Released on January 5, 2026.92 ~~~~93942. Bump the version in *packages/core/deno.json*:9596 Change `"version": "1.2.3"` to `"version": "1.2.4"`.97983. Run the version sync script:99100 ~~~~ bash101 mise check-versions --fix102 ~~~~1031044. Commit the version bump:105106 ~~~~ bash107 git add -A108 git commit -m "Version bump109110 [ci skip]"111 ~~~~112113### Step 3: push114115Push the tag and branch to the remote:116117~~~~ bash118git push origin 1.2.3 1.2-maintenance119~~~~120121### Step 4: cascade merges122123After creating a patch release, you must merge it forward to newer maintenance124branches and eventually to `main`.1251261. Check if a newer maintenance branch exists (e.g., `1.3-maintenance`):127128 ~~~~ bash129 git branch -a | grep maintenance130 ~~~~1311322. If a newer maintenance branch exists:133134 1) Check out the newer branch and merge the tag:135136 ~~~~ bash137 git checkout 1.3-maintenance138 git merge 1.2.3139 ~~~~140141 2) Resolve any conflicts (commonly in *CHANGES.md*, *deno.json*, and142 *package.json* files).143144 3) **Copy changelog entries**: After resolving conflicts, copy the145 changelog entries from the merged tag's version into the current146 branch's unreleased version section. The entries should be:147148 - Grouped by package (e.g., `### @optique/core`, `### @optique/run`)149 - Inserted *above* any existing entries in each package section150 - Issue/PR reference definitions (e.g., `[#123]: ...`) should not151 be duplicated if they already exist152153 For example, if merging 1.2.3 into 1.3-maintenance where 1.3.2 is154 pending:155156 *Before* (1.3-maintenance):157158 ~~~~ markdown159 Version 1.3.2160 -------------161162 To be released.163164 ### @optique/run165166 - Added new logging features. [[#125]]167168 [#125]: https://github.com/dahlia/optique/issues/125169 ~~~~170171 *Merged tag 1.2.3 contains*:172173 ~~~~ markdown174 Version 1.2.3175 -------------176177 Released on January 6, 2026.178179 ### @optique/run180181 - Fixed a crash on startup. [[#123]]182183 [#123]: https://github.com/dahlia/optique/issues/123184 ~~~~185186 *After* (1.3-maintenance):187188 ~~~~ markdown189 Version 1.3.2190 -------------191192 To be released.193194 ### @optique/run195196 - Fixed a crash on startup. [[#123]]197 - Added new logging features. [[#125]]198199 [#123]: https://github.com/dahlia/optique/issues/123200 [#125]: https://github.com/dahlia/optique/issues/125201 ~~~~202203 4) Run tests to verify:204205 ~~~~ bash206 mise test207 mise check208 ~~~~209210 5) Complete the merge commit (use default message).211212 6) Create a new patch release for this branch by repeating Steps 1-3213 for version 1.3.x (e.g., 1.3.1).214215 7) Continue cascading to even newer maintenance branches if they exist.2162173. If no newer maintenance branch exists, merge to `main`:218219 ~~~~ bash220 git checkout main221 git merge 1.2.3 # or the last tag you created (e.g., 1.3.1)222 ~~~~223224 Resolve conflicts, run tests, and push:225226 ~~~~ bash227 mise test228 mise check229 git push origin main230 ~~~~231232233 > [!IMPORTANT]234 > Do *not* copy changelog entries to `main`. The `main` branch tracks235 > the next major/minor release, so patch release entries should not be236 > duplicated there. Just resolve conflicts and keep the existing237 > unreleased section as-is.238239240Major/minor releases241--------------------242243Major/minor releases (e.g., 1.3.0, 2.0.0) introduce new features or breaking244changes. They are always created from the `main` branch with patch version 0.245246### Step 1: prepare the release on main2472481. Check out and update main:249250 ~~~~ bash251 git checkout main252 git pull253 ~~~~2542552. Update *CHANGES.md*: Find the section for the version being released and256 change “To be released.” to “Released on {Month} {Day}, {Year}.” using257 the current date in English. For example:258259 ~~~~ markdown260 Version 1.3.0261 -------------262263 Released on January 5, 2026.264 ~~~~2652663. Commit the changes:267268 ~~~~ bash269 git add CHANGES.md270 git commit -m "Release 1.3.0"271 ~~~~2722734. Create the tag (without `v` prefix). Always use `-m` to provide a tag274 message to avoid opening an editor for GPG-signed tags:275276 ~~~~ bash277 git tag -m "Optique 1.3.0" 1.3.0278 ~~~~279280### Step 2: prepare next version on main2812821. Add a new section at the top of *CHANGES.md* for the next minor version:283284 ~~~~ markdown285 Version 1.4.0286 -------------287288 To be released.289290291 Version 1.3.0292 -------------293294 Released on January 5, 2026.295 ~~~~2962972. Bump the version in *packages/core/deno.json*:298299 Change `"version": "1.3.0"` to `"version": "1.4.0"`.3003013. Run the version sync script:302303 ~~~~ bash304 mise check-versions --fix305 ~~~~3063074. Commit the version bump:308309 ~~~~ bash310 git add -A311 git commit -m "Version bump312313 [ci skip]"314 ~~~~315316### Step 3: push main and tag317318~~~~ bash319git push origin 1.3.0 main320~~~~321322### Step 4: create maintenance branch3233241. Create the maintenance branch from the release tag:325326 ~~~~ bash327 git branch 1.3-maintenance 1.3.0328 ~~~~3293302. Check out the maintenance branch:331332 ~~~~ bash333 git checkout 1.3-maintenance334 ~~~~3353363. Add a section for the first patch version in *CHANGES.md*:337338 ~~~~ markdown339 Version 1.3.1340 -------------341342 To be released.343344345 Version 1.3.0346 -------------347348 Released on January 5, 2026.349 ~~~~3503514. Bump the version in *packages/core/deno.json*:352353 Change `"version": "1.3.0"` to `"version": "1.3.1"`.3543555. Run the version sync script:356357 ~~~~ bash358 mise check-versions --fix359 ~~~~3603616. Commit the version bump:362363 ~~~~ bash364 git add -A365 git commit -m "Version bump366367 [ci skip]"368 ~~~~3693707. Push the maintenance branch:371372 ~~~~ bash373 git push origin 1.3-maintenance374 ~~~~375376377Version format reference378------------------------379380 - Patch releases: `X.Y.Z` where Z > 0 (e.g., 1.2.3, 1.2.4)381 - Minor releases: `X.Y.0` (e.g., 1.3.0, 1.4.0)382 - Major releases: `X.0.0` (e.g., 2.0.0, 3.0.0)383 - Maintenance branches: `X.Y-maintenance` (e.g., 1.2-maintenance)384 - Tags: No `v` prefix (e.g., `1.2.3`, not `v1.2.3`)385 - Tag messages: `Optique X.Y.Z` format (use `-m` flag to avoid editor)386387388CHANGES.md format389-----------------390391Each version section follows this format:392393~~~~ markdown394Version X.Y.Z395-------------396397Released on {Month} {Day}, {Year}.398399### @optique/core400401 - Change description. [[#123]]402403### @optique/run404405 - Change description.406407[#123]: https://github.com/dahlia/optique/issues/123408~~~~409410For unreleased versions:411412~~~~ markdown413Version X.Y.Z414-------------415416To be released.417~~~~418419420Checklist summary421-----------------422423### Patch release checklist424425 - [ ] Check out `X.Y-maintenance` branch426 - [ ] Update *CHANGES.md* release date427 - [ ] Commit with message “Release X.Y.Z”428 - [ ] Create tag `X.Y.Z` with `-m "Optique X.Y.Z"`429 - [ ] Add next version section to *CHANGES.md*430 - [ ] Bump version in *packages/core/deno.json*431 - [ ] Run `mise check-versions --fix`432 - [ ] Commit with message `Version bump\n\n[ci skip]`433 - [ ] Push tag and branch434 - [ ] Cascade merge to newer maintenance branches (if any):435 - [ ] Merge tag into newer branch436 - [ ] Copy changelog entries to unreleased version (above existing437 entries)438 - [ ] Run tests and complete merge commit439 - [ ] Create patch release for that branch440 - [ ] Merge to `main` (if no newer maintenance branches)441442### Major/minor release checklist443444 - [ ] Check out `main` branch445 - [ ] Update *CHANGES.md* release date446 - [ ] Commit with message “Release X.Y.0”447 - [ ] Create tag `X.Y.0` with `-m "Optique X.Y.0"`448 - [ ] Add next version section to *CHANGES.md*449 - [ ] Bump version in *packages/core/deno.json*450 - [ ] Run `mise check-versions --fix`451 - [ ] Commit with message `Version bump\n\n[ci skip]`452 - [ ] Push tag and `main` branch453 - [ ] Create `X.Y-maintenance` branch from tag454 - [ ] Check out maintenance branch455 - [ ] Add patch version section to *CHANGES.md*456 - [ ] Bump version to X.Y.1 in *packages/core/deno.json*457 - [ ] Run `mise check-versions --fix`458 - [ ] Commit with message `Version bump\n\n[ci skip]`459 - [ ] Push maintenance branch460461---462> Source: [dahlia/optique](https://github.com/dahlia/optique) — distributed by [TomeVault](https://tomevault.io).463<!-- tomevault:4.0:skill_md:2026-06-29 -->