diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md new file mode 100644 index 0000000..4c1f602 --- /dev/null +++ b/.agents/skills/release/SKILL.md @@ -0,0 +1,123 @@ +--- +name: release +description: "Cut a Museion release: bump, notes, rail, DMG, tag, publish." +platforms: [macos] +version: 0.1.1 +author: Hermes +metadata: + hermes: + tags: [Release, Museion, Xcode, Notarization, Gitea, apex] +--- + +# 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_VERSION` is 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 — the `scripts/release.sh` header has the route); the agent imports nothing. +- Notary profile `museion-notary`, registered once by the Account Holder. The agent never runs `notarytool store-credentials`. +- `tea` logged in to `git.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. + +1. **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):** + ```bash + 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/apex + ``` + **Homebrew (fallback only — the formula lags GitHub by days; on 0.1.1's cut day it still carried 1.1.58):** + ```bash + brew update && brew upgrade apex + SRC=$(brew --prefix)/bin/apex # a symlink; lipo reads through it + ``` + Either way `lipo -info "$SRC"` must list `arm64` (GitHub ships x86_64+arm64; Homebrew on Apple Silicon is arm64-only — `lipo -thin` still works on a thin file). + + **Then the one recipe (ADR-0011 — 1.1.59 still links libyaml dynamically; the vendored `libyaml.bundle` stays):** + ```bash + cd + 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,