Skip to content

Commit 4bc3682

Browse files
committed
fix: split Homebrew tap update into its own ubuntu job
Justintime50/homebrew-releaser is a Docker-based action; Docker actions only run on Linux runners. Our `release` job runs on `macos-latest` to cross-compile darwin binaries, so the embedded tap-update step failed with `Container action is only supported on Linux` after v0.2.2 was published, leaving the tap formula at 0.2.0. Mirror putdotio/putio-cli's split: keep the Release job on macos for the build, expose its semantic-release outputs, and run the Justintime50 action in a separate ubuntu-latest job downstream.
1 parent fad0b3f commit 4bc3682

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ jobs:
7373
concurrency:
7474
group: release-${{ github.repository }}-main
7575
cancel-in-progress: false
76+
# Expose semantic-release's outputs so the downstream `update-homebrew-tap`
77+
# job (on ubuntu, since Justintime50/homebrew-releaser is a Docker action
78+
# and Docker actions don't run on macOS) can gate on whether a release
79+
# was actually published.
80+
outputs:
81+
new_release_published: ${{ steps.release.outputs.new_release_published }}
82+
new_release_version: ${{ steps.release.outputs.new_release_version }}
83+
new_release_git_tag: ${{ steps.release.outputs.new_release_git_tag }}
7684

7785
steps:
7886
- uses: actions/checkout@v4
@@ -150,15 +158,18 @@ jobs:
150158
tccutil-rs_v*_darwin-amd64.tar.gz
151159
checksums.txt
152160
153-
- name: Update Homebrew tap
154-
# Same action putdotio/putio-cli uses. Reads our release assets, picks
155-
# the ones whose filename ends with `darwin-arm64.tar.gz` /
156-
# `darwin-amd64.tar.gz`, regenerates the formula, and pushes straight
157-
# to uinaf/homebrew-tap's main branch — no fork, no PR. Now that the
158-
# repo is named `tccutil-rs`, Formula/tccutil-rs.rb is what the action
159-
# writes by default (it derives the formula filename from the repo
160-
# name), so no overrides are needed.
161-
if: steps.release.outputs.new_release_published == 'true'
161+
# Justintime50/homebrew-releaser is a Docker-based action and Docker actions
162+
# only run on Linux, so the tap update lives in its own ubuntu-latest job.
163+
# Same split putdotio/putio-cli uses. Runs after `release` so the GitHub
164+
# Release with darwin tarballs already exists when the action scans assets.
165+
update-homebrew-tap:
166+
if: needs.release.outputs.new_release_published == 'true'
167+
name: Update Homebrew tap
168+
needs: [release]
169+
runs-on: ubuntu-latest
170+
timeout-minutes: 10
171+
steps:
172+
- name: Release to Homebrew tap
162173
uses: Justintime50/homebrew-releaser@v3
163174
with:
164175
homebrew_owner: uinaf

0 commit comments

Comments
 (0)