From a73e88e12a05f0e8190a105e1eee7a67a390b3ef Mon Sep 17 00:00:00 2001 From: Fabian Meyer <44942030+dinooo13@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:50:34 +0100 Subject: [PATCH 1/3] Install: a Homebrew cask in dinooo13/homebrew-tap, bumped by the Release workflow scripts/pladder.rb is the tap's Casks/pladder.rb without its version and SHA-256, and scripts/cask.sh fills them in. After the publish, release.yml commits the new cask to the tap through the contents API with HOMEBREW_TAP_TOKEN, a release environment secret; a draft is skipped and a failed bump leaves the run green. INSTALL.md, the README, the site's closing call and llms.txt name the brew command. The cask has no auto_updates: with it brew upgrade skips the app, and Pladder checks for updates by itself only when the user turns that on. Refs #112 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 20 +++++++++++++ CLAUDE.md | 3 +- INSTALL.md | 54 ++++++++++++++++++++++++++++++++++- README.md | 6 +++- scripts/cask.sh | 27 ++++++++++++++++++ scripts/pladder.rb | 31 ++++++++++++++++++++ site/index.html | 1 + site/llms.txt | 1 + site/style.css | 2 ++ 9 files changed, 142 insertions(+), 3 deletions(-) create mode 100755 scripts/cask.sh create mode 100644 scripts/pladder.rb diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d52f5b..90d36c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -213,6 +213,26 @@ jobs: gh release create "v$VERSION" --verify-tag ${draft[@]+"${draft[@]}"} \ --title "Pladder $VERSION" --notes-file "$RUNNER_TEMP/notes.md" \ dist/release/Pladder.dmg dist/release/Pladder.dmg.sha256 dist/release/appcast.xml + - name: Bump the Homebrew cask + # The release is out by now, so a failed bump leaves the run green and + # is done by hand (INSTALL.md, "Homebrew"). A draft's DMG is not public, + # so the cask would point at a 404. + if: ${{ !inputs.draft }} + continue-on-error: true + env: + GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + run: | + if [[ -z "$GH_TOKEN" ]]; then + echo "::error::No HOMEBREW_TAP_TOKEN in the release environment; bump the cask by hand." + exit 1 + fi + sha=$(cut -d ' ' -f 1 dist/release/Pladder.dmg.sha256) + ./scripts/cask.sh "$VERSION" "$sha" > "$RUNNER_TEMP/pladder.rb" + api=repos/dinooo13/homebrew-tap/contents/Casks/pladder.rb + old=$(gh api "$api" --jq .sha) + gh api -X PUT "$api" -f message="pladder $VERSION" -f sha="$old" \ + -f content="$(base64 < "$RUNNER_TEMP/pladder.rb" | tr -d '\n')" \ + --jq .commit.html_url - name: Delete the tag of a release that was not published # Deleting is allowed where creating is not, so this works even after # main's workflows changed. A release that exists keeps its tag. diff --git a/CLAUDE.md b/CLAUDE.md index 5117a9c..8bbbea9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,6 +29,7 @@ swift test # unit tests, well under a second ./scripts/release.sh # Developer ID, notarised, stapled → dist/release/Pladder.dmg; publishes nothing ./scripts/changelog.sh [] # the release notes release.yml publishes, from the commit subjects ./scripts/appcast.sh # sign the DMG for Sparkle and print the release's appcast.xml +./scripts/cask.sh [] # the Homebrew tap's Casks/pladder.rb, from scripts/pladder.rb swift run -c release pladder-cli