From 367804f68167b71797b2e3a19b92098195ecd050 Mon Sep 17 00:00:00 2001 From: Jan Vetesnik Date: Sat, 13 Jun 2026 18:02:07 +0200 Subject: [PATCH] ci: stash rendered formula before checkout in source-repo commit step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `git checkout main` aborted on the v0.2.0 release because the freshly-rendered Formula/dsmview.rb differed from the committed version. Save it to /tmp first, then force-checkout main, then restore. Release tap-push step already succeeded, so brew install worked — only the back-commit refresh was missed. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11b67ed..ba3bc14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,11 +155,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # Stash the newly rendered formula before switching branches — + # otherwise `git checkout main` aborts when the working-tree + # formula differs from main's committed version. + cp Formula/dsmview.rb /tmp/dsmview.rb git config user.email "github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git fetch origin main - git checkout main - cp Formula/dsmview.rb /tmp/dsmview.rb + git checkout -f main git pull --rebase origin main || true cp /tmp/dsmview.rb Formula/dsmview.rb git add Formula/dsmview.rb