Releasing MarkText#
The release pipeline is triggered by pushing a v* tag. The Release MarkText workflow (.github/workflows/release.yml) then runs validate → build (4-platform matrix) → publish and creates a GitHub Release with installers and SHA256SUMS.txt.
The flow below covers both release candidates and stable releases — same steps, only the version string differs.
Prerequisites#
- Push access to
marktext/marktext ghCLI authenticated (gh auth status)- A clean checkout of the latest
develop
1. Cut a release branch (first RC only)#
git checkout develop
git pull --ff-only
git checkout -b release/vX.Y.0 # e.g. release/v0.19.0Reuse the same branch for every RC of that minor version (rc.1, rc.2, …) and the eventual stable tag. For follow-ups, just git checkout release/vX.Y.0 and skip to step 2.
2. Bump package.json#
Edit the version field — it is the only file you need to change.
| Stage | Version string |
|---|---|
| Release candidate | 0.19.0-rc.1, 0.19.0-rc.2, … |
| Stable | 0.19.0 |
3. Commit and push the branch#
git add package.json
git commit -m "chore(release): vX.Y.Z[-rc.N]"
git push -u origin release/vX.Y.04. Tag and push#
git tag -a vX.Y.Z-rc.N -m "vX.Y.Z-rc.N"
git push origin vX.Y.Z-rc.NA - in the tag (e.g. v0.19.0-rc.1) tells the workflow to mark the GitHub Release as pre-release automatically. Plain vX.Y.Z tags publish as stable releases.
5. Open a tracking PR (RC only)#
Open a draft PR from release/vX.Y.0 → develop for visibility. Do not merge it until the matching stable tag is pushed — merging an RC commit would freeze develop at the RC version.
gh pr create --draft --base develop --head release/vX.Y.0 \
--title "chore(release): vX.Y.0 release branch (DO NOT MERGE until stable)" \
--body "Tracking branch for vX.Y.0. Merge after the stable tag is published."6. Monitor the workflow#
gh run list --workflow=release.yml --limit 3
gh run watch <run-id> --exit-statusApproximate timing: validate ~30 s · build matrix ~15–30 min (4 platforms in parallel) · publish ~1 min.
7. Verify the published release#
gh release view vX.Y.Z-rc.NConfirm:
Pre-releasebadge on the release page (RC only)- 24 assets:
- Linux (5):
AppImage,deb,rpm,snap,tar.gz - macOS arm64 (4):
dmg,dmg.blockmap,zip,zip.blockmap - macOS x64 (4):
dmg,dmg.blockmap,zip,zip.blockmap - Windows x64 (3):
setup.exe,setup.exe.blockmap,zip - Windows arm64 (3):
setup.exe,setup.exe.blockmap,zip - Auto-updater metadata (4):
latest.yml,latest-mac.yml,latest-linux.yml,builder-debug.yml - Checksums (1):
SHA256SUMS.txt
- Linux (5):
- Auto-generated release notes list the PRs merged since the previous tag
8. Post-stable cleanup (after stable vX.Y.0 ships)#
- Mark the tracking PR from step 5 ready for review and merge into
develop - Open a follow-up PR bumping
develop'spackage.jsonto the next dev version (e.g.0.20.0-dev)
For hotfixes off a previously-released tag, see RELEASE_HOTFIX.md. Once the hotfix branch is ready, steps 2–7 above apply.
