From c90cbd73993d582112efb5f154e6c07aab4cdb7d Mon Sep 17 00:00:00 2001 From: Prophet731 Date: Sun, 26 Apr 2026 02:42:21 -0400 Subject: [PATCH] fix(ci): force-publish releases as non-draft + latest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit softprops/action-gh-release@v2 has a long-standing intermittent bug where it creates the release as a draft and silently fails to flip the draft→published step, even though it logs "🎉 Release ready" and the job exits successfully. v1.4.0, v1.4.1, and v1.4.2 all shipped as drafts because of this — meaning the GitHub `releases/latest` API returned v1.3.0, the documented install snippets and the new install.sh would both download v1.3.0, and admins running the upgrade flow would never actually get the storage-type-code fix. Two changes: 1. Pass `make_latest: 'true'` to the action so a successful create also explicitly marks the release as latest (when the action is working correctly). 2. Add an unconditional follow-up step `gh release edit --draft=false --latest` that runs whenever the create step ran. If the action already published correctly, this is a no-op. If it failed to flip, we recover. Token + variables go through `env:` blocks (not interpolated inline into `run:`) to match the workflow injection guidance the rest of the file already follows. v1.4.0/1/2 were manually re-published with `gh release edit` as a one-off cleanup; this fix prevents the same situation from recurring. --- .github/workflows/publish-release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 12f448d..c24cc36 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -166,3 +166,24 @@ jobs: body_path: /tmp/release-notes.md draft: false prerelease: false + make_latest: 'true' + + # Belt-and-suspenders: action-gh-release@v2 has a long-standing + # intermittent bug where it creates the release as a draft and silently + # fails to flip the draft→published step, even though it reports success. + # When that happens the install script + README snippets resolve "latest" + # to whatever was last properly published, so users would get an old + # version. We explicitly flip to published + latest here as a safety net; + # if the action already did it correctly, this is a no-op. + # + # Security note: TAG and REPO are sourced from earlier `env:` blocks (not + # interpolated inline into the run command), matching the same pattern + # used elsewhere in this workflow. + - name: Force-publish release + if: steps.existing.outputs.skip != 'true' + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ steps.version.outputs.tag }} + REPO: ${{ github.repository }} + run: | + gh release edit "$TAG" --repo "$REPO" --draft=false --latest