gnucash-on-windows future: Workflows: Adjust release-publishing action to ensure the tag is created.
John Ralls
jralls at code.gnucash.org
Mon Aug 24 20:03:32 EDT 2026
Updated via https://github.com/Gnucash/gnucash-on-windows/commit/6d79ebaa (commit)
from https://github.com/Gnucash/gnucash-on-windows/commit/e9a795f5 (commit)
commit 6d79ebaa1de5448df108992d0b8f30e3b3e92789
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Aug 24 17:01:07 2026 -0700
Workflows: Adjust release-publishing action to ensure the tag is created.
Uploading assets to a release whose tag doesn't exist yet permanently
pins their download URLs to a synthetic "untagged-XXXX" path --
publishing the release afterwards does NOT fix already-uploaded assets.
So this ordering (create empty, publish, only then upload) is
load-bearing; don't collapse it back into a single "gh release create
<tag> <files>" call.
diff --git a/.github/actions/publish-ucrt64-repo/action.yml b/.github/actions/publish-ucrt64-repo/action.yml
index dcc7774..44b85eb 100644
--- a/.github/actions/publish-ucrt64-repo/action.yml
+++ b/.github/actions/publish-ucrt64-repo/action.yml
@@ -64,27 +64,26 @@ runs:
exit 1
}
- gh release upload ${{ inputs.release-tag }} $assets --clobber
- Write-Host "gh release upload exit code: $LASTEXITCODE"
+ gh release view ${{ inputs.release-tag }} *>$null
if ($LASTEXITCODE -ne 0) {
- gh release create ${{ inputs.release-tag }} $assets `
+ # Create it with no assets yet, and publish it immediately, so its
+ # tag is fully materialized before anything is ever uploaded.
+ gh release create ${{ inputs.release-tag }} `
--title "GnuCash ucrt64 dependency repo" `
--notes "Auto-generated rolling pacman repository for ucrt64. Do not edit manually; updated incrementally by workflows under .github/workflows/."
- Write-Host "gh release create exit code: $LASTEXITCODE"
if ($LASTEXITCODE -ne 0) {
- Write-Error "gh release create failed (exit $LASTEXITCODE) after gh release upload also failed -- see output above for the actual error."
+ Write-Error "gh release create failed (exit $LASTEXITCODE)."
+ exit 1
+ }
+ gh release edit ${{ inputs.release-tag }} --draft=false
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error "gh release edit --draft=false failed (exit $LASTEXITCODE)."
exit 1
}
}
- # Belt-and-braces: pacman needs to fetch these assets anonymously, so
- # the release must actually be published, not a draft. Force it every
- # run regardless of how it got here (gh release upload succeeds
- # against a draft release just as happily as a published one, so a
- # stray draft -- however it was created -- would otherwise keep
- # silently absorbing every publish with no visible error).
- gh release edit ${{ inputs.release-tag }} --draft=false
+ gh release upload ${{ inputs.release-tag }} $assets --clobber
if ($LASTEXITCODE -ne 0) {
- Write-Error "gh release edit --draft=false failed (exit $LASTEXITCODE) -- the release may still be a draft and unreachable by anonymous downloads."
+ Write-Error "gh release upload failed (exit $LASTEXITCODE)."
exit 1
}
Summary of changes:
.github/actions/publish-ucrt64-repo/action.yml | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
More information about the gnucash-changes
mailing list