18 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.3.0 | 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, then the announcements — Micro.blog and Buy Me a Coffee — each left as a draft for Alexander to publish. 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); neither announcement is ever published by the agent.
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).- Micro.blog announcement token in the login keychain:
security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -wprints it (step 11 has the one-timeadd-generic-password). When missing, Alexander generates an App Token (Micro.blog → Account → App Tokens) and the agent stores it — never the other way around. - Ego Browser running and logged in to Buy Me a Coffee —
buymeacoffee-posthas the one-time check. - 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. Patch for a bug-fix cut (
X.Y.0→X.Y.1), minor for a feature cut (X.Y.1→X.Y+1.0) —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. -
Micro.blog announcement — a DRAFT, never a publish. The post goes to Micro.blog as
post-status: draftso Alexander reviews and publishes it himself (thepreviewlink lands in the report). Token: a Micro.blog App Token (Account → App Tokens) stored ONCE in the login keychain under its own service — never the app's production slot (com.babylondreams.Museion.micropub, accountmicro.blog— that is the app's live credential, see MuseionTests/AGENTS.md), never a file in the repo:security add-generic-password -U -a micro.blog -s com.babylondreams.Museion.release-announce -w '<app token>' </dev/null(The
</dev/nullis load-bearing: without itsecurityprompts for a retype.) Then:TOK=$(security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -w) curl -sS -H "Authorization: Bearer $TOK" 'https://micro.blog/micropub?q=config' # read destinations + channelsmp-destinationis mandatory on this account:q=configlists three microblogs andmicroblog-defaultisfalseon every one, so a post without it is ambiguous. The main blog ishttps://AlexKucera.micro.blog/(namealexanderkucera.com); the other two are a tweets cross-post and a test blog. Article posts takemp-channel: default(thechannelslist:default= Posts,pages= Pages). Post:python3 - "$TOK" <<'PY' import json, sys, urllib.request tok = sys.argv[1] payload = {"type": ["h-entry"], "properties": { "name": ["Museion X.Y.Z"], "content": ["<the announcement, markdown>"], "post-status": ["draft"], "mp-destination": ["https://AlexKucera.micro.blog/"], "mp-channel": ["default"]}} req = urllib.request.Request("https://micro.blog/micropub", data=json.dumps(payload).encode(), headers={"Authorization": f"Bearer {tok}", "Content-Type": "application/json"}, method="POST") with urllib.request.urlopen(req, timeout=30) as r: print(r.status, r.headers.get("Location"), r.read().decode()) PYBody:
docs/releases/X.Y.Z.mdis too long for a microblog post — distill it to a short announcement (what was fixed in plain words, the download link, the release-page link, "Developer ID signed and notarized"). A draft does NOT syndicate, so thesyndicate-totargets inq=config(Mastodon/Bluesky/Threads) are not touched until Alexander publishes. Read back before reporting:GET '/micropub?q=source&url=<Location>'must showpost-status: draftand the content intact — a 2xx alone is not a result. Done when the read-back says draft and the report carries theurl(the post's final address) and thepreviewlink.previewis display-only — never the publish/update target. A token pasted into chat is in the transcript: recommend rotation after the run. -
Buy Me a Coffee announcement — a DRAFT, never a publish. The step-11 announcement as a BMC post, left for Alexander to publish. The mechanics (Ego Browser, the
scripts/bmc.jsdriver, selectors, pitfalls) live in thebuymeacoffee-postskill; the release only fixes theINPUT:action: "create", mode: "draft", audience: "public", title: "Museion X.Y.Z", html: <the step-11 announcement as HTML>,Done when
RESULT.modeis"draft"andRESULT.editUrlis ahttps://buymeacoffee.com/posts/<id>/editURL — the script printsnullwhen the drafts list does not show the row, and that is not done. The edit URL goes in the report beside the Micro.blogpreviewlink. -
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'(Gitea spells ittag_name, nottag) - Micro.blog:
POST https://micro.blog/micropubJSONh-entry+post-status: draft+mp-destination(mandatory — no default blog) +mp-channel: default→202+Location; read backq=source&url=…→post-status: draft. Token: Keychain servicecom.babylondreams.Museion.release-announce. Never publish. - Buy Me a Coffee:
buymeacoffee-post→create+mode: "draft"+audience: "public"→RESULT.editUrlinto the report. Never publish.
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.grep -E '^\s*token:'+sedis enough; PyYAML is not installed on the system python. tea releases createprints NOTHING on success (exit 0, empty output). Thetea apiread-back is the only proof — and Gitea's release JSON hastag_name, not GitHub'stag.security add-generic-password -w <value>without</dev/nullprompts for a retype and fails with "passwords don't match" when stdin is not a tty; the item is NOT stored and the next read returns 0 chars. Always</dev/null, always read the length back.- A Micro.blog post without
mp-destinationis a gamble on this account —q=configshows three microblogs and none ismicroblog-default. Readq=configbefore every announcement; the destination set can change. q=source&url=…read-back does not echomp-destinationormp-channel; the post'sLocationhost (alexanderkucera.com) is the evidence the destination took.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. Micro.blog: GET https://micro.blog/micropub?q=source&url=<Location> → post-status: draft, content intact. Buy Me a Coffee: RESULT.mode: "draft" + RESULT.editUrl in the report. Both drafts sit in Alexander's queues awaiting his publish.