Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ jobs:
exit 1
fi

tap_dir="$(mktemp -d)"
git clone "https://x-access-token:${TAP_GITHUB_TOKEN}@github.com/meck93/homebrew-tap.git" "$tap_dir"
HOMEBREW_NO_AUTO_UPDATE=1 brew tap meck93/tap "https://x-access-token:${TAP_GITHUB_TOKEN}@github.com/meck93/homebrew-tap.git"
tap_dir="$(brew --repo meck93/tap)"

mkdir -p "$tap_dir/Casks"
cp Casks/capture-this.rb "$tap_dir/Casks/capture-this.rb"
Expand All @@ -137,8 +137,7 @@ jobs:
ruby -pi -e 'gsub(/sha256 "[^"]+"/, "sha256 \"#{ENV.fetch("DMG_SHA256")}\"")' "$tap_dir/Casks/capture-this.rb"

cd "$tap_dir"
HOMEBREW_NO_AUTO_UPDATE=1 brew tap meck93/tap "$tap_dir"
HOMEBREW_NO_AUTO_UPDATE=1 brew audit --cask --new meck93/tap/capture-this
HOMEBREW_NO_AUTO_UPDATE=1 brew audit --cask meck93/tap/capture-this

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
2 changes: 1 addition & 1 deletion Casks/capture-this.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
desc "Native macOS menu bar app for screen recording"
homepage "https://github.com/meck93/capture-this"

depends_on macos: ">= :sequoia"
depends_on macos: :sequoia
depends_on arch: :arm64

postflight do
Expand Down
16 changes: 10 additions & 6 deletions docs/homebrew-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ The release workflow will:
5. Create or update the GitHub release for `v0.1.0`.
6. Calculate the SHA-256 for `artifacts/CaptureThis.dmg`.
7. Create a GitHub App installation token for `meck93/homebrew-tap`.
8. Clone `meck93/homebrew-tap`.
9. Copy `Casks/capture-this.rb` from this repository into the tap.
10. Update `Casks/capture-this.rb` with the release version and DMG checksum.
11. Register the temporary checkout as `meck93/tap` and run `brew audit --cask --new meck93/tap/capture-this`.
12. Commit and push the tap update.
8. Tap `meck93/homebrew-tap` with the GitHub App token.
9. Resolve the canonical tap checkout with `brew --repo meck93/tap`.
10. Copy `Casks/capture-this.rb` from this repository into the tap checkout.
11. Update `Casks/capture-this.rb` with the release version and DMG checksum.
12. Run `brew audit --cask meck93/tap/capture-this`.
13. Commit and push the tap update.

The first successful release creates `Casks/capture-this.rb` in the tap if it does not exist yet.

Expand Down Expand Up @@ -115,7 +116,10 @@ Validate and push:

```bash
brew tap meck93/tap .
brew audit --cask --new meck93/tap/capture-this
tap_dir="$(brew --repo meck93/tap)"
cp Casks/capture-this.rb "$tap_dir/Casks/capture-this.rb"
cd "$tap_dir"
brew audit --cask meck93/tap/capture-this
git add Casks/capture-this.rb
git commit -m "chore: update CaptureThis to 0.1.0"
git push
Expand Down
Loading