ci: update the Homebrew tap on release; docs for brew and branches
CI / test (push) Successful in 3m19s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel SamsonandClaude Sonnet 5.5 committed 2026-10-17 14:27:43 +01:00
1 parent 47b12895fd
commit 24c7a2804d
4 files changed
+97 -1

No files matched your search

+19
View File
@@ -79,3 +79,22 @@ jobs:
-H "Authorization: token $TOKEN" -F "attachment=@$f")
[ "$code" = "201" ] || { echo "upload of $f failed: HTTP $code"; cat "$resp"; echo; exit 1; }
done
- name: Update the Homebrew tap
# Needs a TAP_TOKEN secret: a personal access token with write access to
# samson-media/homebrew-tap. Skipped when the secret is not set.
env:
TAP_TOKEN: ${{ secrets.TAP_TOKEN }}
run: |
if [ -z "$TAP_TOKEN" ]; then echo "TAP_TOKEN not set; skipping the tap update"; exit 0; fi
tap=$(mktemp -d)
git clone "https://x-access-token:${TAP_TOKEN}@${GITHUB_SERVER_URL#https://}/samson-media/homebrew-tap.git" "$tap"
mkdir -p "$tap/Formula"
sh .github/ci/render-formula.sh "${TAG#v}" dist/SHA256SUMS > "$tap/Formula/zag.rb"
cd "$tap"
git config user.name "zag release workflow"
git config user.email "actions@gitea.samson.media"
git add Formula/zag.rb
if git diff --cached --quiet; then echo "formula unchanged"; exit 0; fi
git commit -m "Update zag to ${TAG#v}"
git push origin HEAD:main