Skip to content

fix: publish GitHub releases without pushing to main - #616

Open
tknopp-ld wants to merge 1 commit into
mainfrom
fix-release-workflow-tag-push
Open

tknopp-ld wants to merge 1 commit into
mainfrom
fix-release-workflow-tag-push

Conversation

@tknopp-ld

@tknopp-ld tknopp-ld commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stop the Release workflow from pushing HEAD to main (blocked by Bot Bouncer + PR-required rulesets). That skip is why v2.17.0 shipped with no assets (REL-15681, run 31702824366).
  • Push the version tag only; create the GitHub release as a draft, upload artifacts, then undraft (immutable releases reject post-publish uploads).
  • Record RELEASE_COMMIT after prepare-release.sh so a missing remote tag is created from the bump commit, not main.
  • Do not overwrite GITHUB_TOKEN when GITHUB_RELEASE_TOKEN is empty.

Test plan

  • ./scripts/release/push-to-origin_test.sh — local bare remote: tag is pushed, origin/main does not move; second run skips an existing tag. This also runs on PRs in go-tests.
  • Cannot fully exercise release.yml on this PR. It is workflow_dispatch only and make publish pushes Docker Hub + Homebrew. After merge, optional dryRun: true dispatch still skips GitHub release/tag push by design.
  • Next real release: confirm the run creates a draft, attaches the 15 archives, then publishes; main is unchanged except via a normal version-bump PR.
  • Confirm a failed tag push still creates the release (continue-on-error on the tag step).

Made with Cursor

REL-15681: rulesets reject the release workflow's push to main, so the
asset-upload step never ran. Push the version tag only, create the
release as a draft, then publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tknopp-ld
tknopp-ld requested a review from a team as a code owner September 14, 2026 12:52

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eb2eda7. Configure here.

run: |
if [[ -n "${GITHUB_RELEASE_TOKEN:-}" ]]; then
echo "GITHUB_TOKEN=$GITHUB_RELEASE_TOKEN" >> "$GITHUB_ENV"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publish aborts on unset GITHUB_TOKEN

High Severity

When GITHUB_RELEASE_TOKEN is empty, GITHUB_TOKEN is no longer exported to GITHUB_ENV. stage-artifacts.sh later expands $GITHUB_TOKEN under set -u, so the publish step dies before Docker Hub, Homebrew, or the GitHub release run.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb2eda7. Configure here.

with:
token: ${{ github.token }}
tag: v${{ inputs.releaseVersion }}
commit: ${{ env.RELEASE_COMMIT }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed tag push cannot create release

Medium Severity

If the tag push fails, the bump commit never reaches GitHub. ncipollo/release-action cannot create a tag at RELEASE_COMMIT because the GitHub API only tags SHAs that already exist on the remote, so continue-on-error does not still produce a release.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb2eda7. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants