From 27a1b4d8b74db0d858f2885ed1da868034301b77 Mon Sep 17 00:00:00 2001 From: Yifeng He Date: Mon, 20 Jul 2026 13:40:20 -0700 Subject: [PATCH] ci: disable Homebrew tap auto-push again (token setup deferred) Drop the homebrew publish-job so releases no longer fail on the cross-repo push to ARA-Labs/homebrew-tap. The HOMEBREW_TAP_TOKEN scope setup is being deferred; the tap is updated manually until it lands. Mirrors #37. The homebrew installer still ships the formula as a release artifact; only the auto-push job is removed. Re-enable via publish-jobs = ["homebrew"] in Cargo.toml + dist generate. --- .github/workflows/release.yml | 49 +---------------------------------- Cargo.toml | 8 +++--- 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b6593b..db72be3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -278,61 +278,14 @@ jobs: gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/* - publish-homebrew-formula: - needs: - - plan - - host - runs-on: "ubuntu-22.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PLAN: ${{ needs.plan.outputs.val }} - GITHUB_USER: "axo bot" - GITHUB_EMAIL: "admin+bot@axo.dev" - if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: true - repository: "ARA-Labs/homebrew-tap" - token: ${{ secrets.HOMEBREW_TAP_TOKEN }} - # So we have access to the formula - - name: Fetch homebrew formulae - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - with: - pattern: artifacts-* - path: Formula/ - merge-multiple: true - # This is extra complex because you can make your Formula name not match your app name - # so we need to find releases with a *.rb file, and publish with that filename. - - name: Commit formula files - run: | - git config --global user.name "${GITHUB_USER}" - git config --global user.email "${GITHUB_EMAIL}" - - for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith(".rb")] | any)'); do - filename=$(echo "$release" | jq '.artifacts[] | select(endswith(".rb"))' --raw-output) - name=$(echo "$filename" | sed "s/\.rb$//") - version=$(echo "$release" | jq .app_version --raw-output) - - export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" - brew update - # We avoid reformatting user-provided data such as the app description and homepage. - brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true - - git add "Formula/${filename}" - git commit -m "${name} ${version}" - done - git push - announce: needs: - plan - host - - publish-homebrew-formula # use "always() && ..." to allow us to wait for all publish jobs while # still allowing individual publish jobs to skip themselves (for prereleases). # "host" however must run to completion, no skipping allowed! - if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') }} + if: ${{ always() && needs.host.result == 'success' }} runs-on: "ubuntu-22.04" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index f467630..13ee36b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,11 @@ ci = "github" installers = ["shell", "homebrew"] # A GitHub repo to push Homebrew formulas to tap = "ARA-Labs/homebrew-tap" -# Publish jobs to run in CI (auto-push the generated formula to the tap; reads -# the cross-repo push token from the HOMEBREW_TAP_TOKEN secret) -publish-jobs = ["homebrew"] +# NOTE: auto-push of the generated formula to the tap is disabled. It required a +# cross-repo push token (HOMEBREW_TAP_TOKEN) whose approval is gated on the org +# owner. The homebrew installer above still generates the formula as a release +# artifact; publishing it to the tap is done manually for now. To re-enable, add +# back `publish-jobs = ["homebrew"]` and regenerate CI (`dist generate`). # Target platforms to build apps for (Rust target-triple syntax) targets = ["aarch64-apple-darwin", "x86_64-unknown-linux-gnu"] # Default every workspace member to do-not-distribute; ara-cli opts back in with