.agents/skills/release/SKILL.md is the end-to-end runbook: refresh the bundled apex renderer, bump, changelog heading, notes, the verify rail, sliced commits, annotated tag, release.sh DMG, then a go-gated push and Gitea release. Step one is now an unconditional apex refresh with the full recipe inline (GitHub releases/latest → .sha256 → lipo arm64 → strip every rpath → add the libyaml.bundle rpath → Developer ID sign with the hardened runtime → prove it in a scratch Resources/ layout before it touches the tree) instead of a "compare --version" check that read as optional. Homebrew is a fallback only: its formula trailed the GitHub release by a version on the 0.1.1 cut day. The skill bumps its own version to 0.1.1. docs/releases/0.1.1.md distills the CHANGELOG section for humans — the false #67 conflict on BOM/CRLF guest files and the apex 1.1.59 refresh — and becomes the Gitea release body. Root AGENTS.md gains the .agents/skills/ Child DOX Index row.
12 KiB
name, description, platforms, version, author, metadata
| name | description | platforms | version | author | metadata | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| release | Cut a Museion release: bump, notes, rail, DMG, tag, publish. |
|
0.1.1 | Hermes |
|
Cutting a Museion release
Runs a release end to end: refresh the bundled apex renderer, version bump, changelog heading, release notes, the verify rail, sliced commits, an annotated tag, the notarized DMG from scripts/release.sh, then push and the Gitea release. The skill decides nothing about signing — release.sh and the Account Holder's keychain do that — and it bumps no version on its own. Push and the forge release wait for Alexander's explicit go (root AGENTS.md, User Preferences).
When to Use
- "cut / ship / tag / bump a release", "make a DMG", "X.Y.Z is ready"
- notarization came back
Invalid, or a bundled binary changed (Museion/Resources/apex) — rerun steps 6–9 and move the still-local tag - release notes or the README have to match what shipped
Prerequisites
- Clean tree on
main.MARKETING_VERSIONis the only version source; read it from build settings, never from the pbxproj text. - A valid Developer ID Application identity:
security find-identity -v -p codesigning. When it is missing, the fix is Alexander's (developer.apple.com + a Keychain Access CSR — thescripts/release.shheader has the route); the agent imports nothing. - Notary profile
museion-notary, registered once by the Account Holder. The agent never runsnotarytool store-credentials. tealogged in togit.babylondreams.de(the default login).- Budget: ~2 min for
release.sh, ~7 min for the rail.
Procedure
Run through the terminal tool. Each step ends on a check; the next starts when it passes.
-
Refresh apex FIRST — every release, no "is it current?" gate. The bundled renderer is stale by definition between releases; the upgrade is the first step, never a comparison that can be skipped. Both sources are the same official binary; pick one:
GitHub release (canonical):
W=$(mktemp -d) && cd "$W" curl -fsSL https://api.github.com/repos/ApexMarkdown/apex/releases/latest -o rel.json TAG=$(python3 -c 'import json;print(json.load(open("rel.json"))["tag_name"])') # v1.1.NN V=${TAG#v} curl -fsSLO "https://github.com/ApexMarkdown/apex/releases/download/$TAG/apex-$V-macos-universal.tar.gz"{,.sha256} awk '{print $1}' apex-$V-macos-universal.tar.gz.sha256 | shasum -a 256 -c - # must print OK — stop otherwise tar xzf apex-$V-macos-universal.tar.gz SRC=apex-$V-macos-universal/apexHomebrew (fallback only — the formula lags GitHub by days; on 0.1.1's cut day it still carried 1.1.58):
brew update && brew upgrade apex SRC=$(brew --prefix)/bin/apex # a symlink; lipo reads through itEither way
lipo -info "$SRC"must listarm64(GitHub ships x86_64+arm64; Homebrew on Apple Silicon is arm64-only —lipo -thinstill works on a thin file).Then the one recipe (ADR-0011 — 1.1.59 still links libyaml dynamically; the vendored
libyaml.bundlestays):cd <repo root> SIGNER="Developer ID Application: Alexander Kucera (3M7APDAAC5)" lipo "$SRC" -thin arm64 -output "$W/apex-arm64" # strip EVERY rpath the binary carries — list them first and delete each one; a Homebrew build carries $(brew --prefix)/lib instead of the CI paths otool -l "$W/apex-arm64" | grep -A2 LC_RPATH | grep path for r in /Users/runner/work/apex/apex/deps/libyaml-universal/lib /usr/local/lib /opt/homebrew/lib "$(brew --prefix)/lib"; do install_name_tool -delete_rpath "$r" "$W/apex-arm64" 2>/dev/null || true # absent paths are fine to skip; the Done-check catches a survivor done install_name_tool -add_rpath '@executable_path/../Resources/libyaml.bundle' "$W/apex-arm64" codesign -f -s "$SIGNER" --options runtime --timestamp "$W/apex-arm64" # PROVE it in the shipped layout before it touches the tree mkdir -p "$W/proof/Resources/libyaml.bundle" && cp "$W/apex-arm64" "$W/proof/Resources/apex" \ && cp Museion/Resources/libyaml.bundle/libyaml-0.2.dylib "$W/proof/Resources/libyaml.bundle/" "$W/proof/Resources/apex" --version printf -- '- a\n\n1. one\n' | "$W/proof/Resources/apex" --no-mixed-lists # two lists, <ul> then <ol> — never one merged <ul> cp "$W/apex-arm64" Museion/Resources/apexBump
## apex X.Y.Z+ thevX.Y.Zprose inMuseion/Resources/THIRD-PARTY-NOTICES.md; add a### Changed→- **reading:**line under the release heading inCHANGELOG.md. Done whenotool -l Museion/Resources/apex | grep -A2 LC_RPATH | grep pathprints exactly@executable_path/../Resources/libyaml.bundle,codesign -dvvshowsflags=0x10000(runtime)+ the Developer ID authority,Museion/Resources/apex --versionprints the new version, and--no-mixed-listsappears in--help(ADR-0011's load-bearing flag). If a future apex links libyaml statically (asked upstream), drop the rpath/codesign dylib steps and the.bundle, and update this skill. An upgrade found after tagging costs a second rail run and a second notarization. -
Bump.
MARKETING_VERSIONon every target and configuration inMuseion.xcodeproj/project.pbxproj;CURRENT_PROJECT_VERSIONstays. Read back:xcodebuild -project Museion.xcodeproj -scheme Museion -configuration Release -destination 'platform=macOS,arch=arm64' -showBuildSettings | awk -F'= ' '/MARKETING_VERSION = /'. Done when it prints the new version. -
Changelog heading.
## [X.Y.Z] - YYYY-MM-DDover the former[Unreleased]entries, a fresh empty[Unreleased]above, one pointer line to the notes (CHANGELOG.mdfollows Common Changelog). Done when every entry since the last tag sits under the heading. -
Release notes —
docs/releases/X.Y.Z.md, the CHANGELOG section distilled for humans: what is in it (grouped highlights), the milestones it closes, install, known limits, numbers. Shape precedent:docs/releases/0.1.0.md. Written from the shipped surface — every claim traces to a CHANGELOG entry or to source. -
README matches what shipped: install copy, requirements, license pointer; the minimum macOS from
MACOSX_DEPLOYMENT_TARGET, never from prose. -
Verify rail on the tree you will tag.
./scripts/full-test.sh start, poll./scripts/full-test.sh status(exit 3 = live), counts from./scripts/full-test.sh summary. Done when executed == passed == the baseline and the run directory is newer than the last edit. Thenswiftformat . && swiftlint .clean, andshellcheck scripts/release.shwhen the script changed. -
Commit in slices, then tag.
docs(readme)·build(release)(tooling + notes + DOX) ·chore(release)(bump + changelog heading) · later fixes asfix(scope). Plain prose bodies, no trailers. Tag:git tag -a vX.Y.Z -m "Museion X.Y.Z — <one line>"on the commit whose tree the DMG is built from. A fix found after tagging: commit it, thengit tag -f vX.Y.Z <fix commit>while the tag is still local. Done whengit describe --tags --exact-match HEADprints the tag and the tree is clean. -
Build and prove the DMG.
./scripts/release.sh— refuses without the identity, reads the version from build settings, writesdist/Museion-X.Y.Z.dmg, and ends withspctl→accepted, source=Notarized Developer ID. Then mount the image and runContents/Resources/apex --versionfrom it,xcrun stapler validate dist/Museion-X.Y.Z.dmg, and recordshasum -a 256 dist/Museion-X.Y.Z.dmg. Done when all four pass and the sha256 is in the report. -
Handoff gate. Report the tag commit, the sha256, and what changed. Push and the forge release happen on Alexander's go.
-
On go — push, release, verify.
git push origin main vX.Y.Z { cat docs/releases/X.Y.Z.md; printf '\n\n[Generated by AI]\n'; } > "$TMPDIR/notes.md" # house rule: the AI marker closes every tea body tea releases create --tag vX.Y.Z --target <tag-commit-sha> -t "Museion X.Y.Z" -f "$TMPDIR/notes.md" -a ./dist/Museion-X.Y.Z.dmg tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'Done when the API shows
draft: false, one asset at the local byte size, and a token-authenticated download of the asset sha256-matches the local file. -
Session log + DOX.
write-logfor the release; the devlog commit follows the tag (the log is the record about the release, not part of it). DOX pass: rootAGENTS.md(commands block, scripts index, session-log window) anddocs/AGENTS.md. The log commit rides the next go.
Quick Reference
- apex: GitHub
releases/latest→.sha256→lipo -thin arm64 -output→ strip ALL rpaths → add@executable_path/../Resources/libyaml.bundle→codesign --options runtime→ prove in a scratchResources/layout → copy intoMuseion/Resources/apex+ bumpTHIRD-PARTY-NOTICES.md. Every release, first. (Homebrew lags GitHub — fallback only.) - Version:
xcodebuild -showBuildSettings … | awk '/MARKETING_VERSION = /' - Rail:
./scripts/full-test.sh start·status·summary - Lint:
swiftformat . && swiftlint . - Tag:
git tag -a vX.Y.Z -m "Museion X.Y.Z — <one line>"· move while local:git tag -f vX.Y.Z <sha> - DMG:
./scripts/release.sh→dist/Museion-X.Y.Z.dmg(NOTARIZE=0skips notarize + staple) - Gatekeeper:
spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg - Push:
git push origin main vX.Y.Z - Release:
tea releases create --tag vX.Y.Z --target <sha> -t "Museion X.Y.Z" -f <notes> -a ./dist/Museion-X.Y.Z.dmg - Read back:
tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'
Pitfalls
release.shpackages whateverMARKETING_VERSIONsays, from the current tree — it bumps and tags nothing.- The old "compare
--version, upgrade if stale" step read as optional and got skipped by habit — the refresh is unconditional. Abrew upgrade apexthat prints "already up-to-date" proves nothing: the formula can trail the GitHub release by days (it did on the 0.1.1 cut). GitHubreleases/latestis the version of record. install_name_tool -delete_rpathfails loudly on a path the binary does not carry — list the rpaths withotool -lfirst and delete exactly those; the Homebrew build carries$(brew --prefix)/lib, the GitHub build the three CI/Homebrew paths. The Done-check (exactly ONE rpath left) catches a survivor before the rail, whererelease.shwould only catch a missing dylib.- A
cpover the signedResources/apexmust happen AFTER the scratch-layout proof — a binary that fails--no-mixed-listsin scratch has already touched nothing. - A green
full-test.sh statusread right after a resource-only edit can be the PREVIOUS run's summary. Compare run-directory timestamps; zeroSwiftCompilelines is normal then, and freshness is theCpResourceline for the changed file plus running it from the test host's built bundle. - A DMG built before the last binary or script change is stale: rebuild, re-notarize, and the sha256 in the report is the one that ships.
- The tag moves only while local; after the push a fix is a new version.
tea releases createtakes the tag via--tagOR the positional — both is "ambiguous arguments".@filebodies work only ontea api; releases take-f <file>.- The release asset download 404s without a token (private repo). Read the token from
~/Library/Application Support/tea/config.ymlinto a shell variable for thecurl— never print it. core.hooksPath=scripts/hooks: the pre-push hook is the lint gate; the rail is yours to run before tagging.- A dylib dropped into a synced Resources folder gets linked into the app by Xcode's classifier; vendored libraries ride a
.bundlefolder (ADR-0011).
Verification
tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z' → draft: false, one asset whose downloaded sha256 equals shasum -a 256 dist/Museion-X.Y.Z.dmg; spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg → accepted, source=Notarized Developer ID.