Skip to content

Commit af47530

Browse files
release: don't let a WinGet publish failure block Scoop/Homebrew
Publish to WinGet ran before Update Homebrew tap, and GitHub Actions stops a job at its first failed step by default — so any WinGet failure was silently skipping the Homebrew tap update too, even though the two publish targets are unrelated. This was masked on the v0.10.0 release only because Scoop happens to run earlier in the file and had already pushed before WinGet failed. vedantmgoyal9/winget-releaser also can't submit a package that has never been published to winget-pkgs before — it only updates an existing manifest — so until casablanque-code.zt is submitted once manually (wingetcreate submit), this step is expected to fail on every release. Add continue-on-error to the WinGet step so Homebrew still runs after it regardless, then a final always()-gated step that checks steps.winget.outcome and fails the job (with a pointer to the wingetcreate fix) if WinGet didn't succeed — so the gap stays visible without blocking the other two targets.
1 parent c89f232 commit af47530

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ jobs:
9393
fi
9494
9595
- name: Publish to WinGet
96+
id: winget
97+
# continue-on-error: a WinGet publish failure shouldn't block the
98+
# Homebrew tap update below it — they're independent publish
99+
# targets. winget-releaser also cannot submit an *unpublished*
100+
# package (only update an existing manifest in winget-pkgs), so
101+
# until casablanque-code.zt has been manually submitted once via
102+
# `wingetcreate submit` this step is *expected* to fail on every
103+
# release — continue-on-error lets the rest of the release
104+
# proceed in the meantime, and the final "Check publish results"
105+
# step below still fails the job overall so the gap doesn't go
106+
# unnoticed once winget-pkgs does have the package.
107+
continue-on-error: true
96108
uses: vedantmgoyal9/winget-releaser@v2
97109
with:
98110
identifier: casablanque-code.zt # pkg name at microsoft/winget-pkgs
@@ -158,3 +170,15 @@ jobs:
158170
git commit -m "chore(homebrew): bump formula to ${GITHUB_REF_NAME}"
159171
git push origin main
160172
fi
173+
174+
- name: Check publish results
175+
# Runs after every other publish step regardless of the WinGet
176+
# outcome (that's the point of continue-on-error above), then
177+
# surfaces the WinGet failure here so it isn't silently
178+
# swallowed — GitHub Release, Scoop, and Homebrew having
179+
# succeeded doesn't mean the release is fully done if WinGet
180+
# didn't publish.
181+
if: always() && steps.winget.outcome == 'failure'
182+
run: |
183+
echo "::error::WinGet publish failed — see the 'Publish to WinGet' step above. If casablanque-code.zt hasn't been submitted to microsoft/winget-pkgs yet, winget-releaser can't create the first entry; submit an initial manifest manually with wingetcreate, then this step will start succeeding on future releases."
184+
exit 1

0 commit comments

Comments
 (0)