Skip to content

Avoid publishing GH releases for main branch pushes #11290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

timflannagan
Copy link
Member

Description

Updates the release pipeline to avoid publishing GH releases for pushes to main branch. Previously, both artifacts and a concrete GH release/tag would be published whenever a PR merged to main. Now, we publish artifacts but avoid publishing a concrete GH release for this event trigger.

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

See #11286 for some context on this.

Signed-off-by: timflannagan <timflannagan@gmail.com>
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 19:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the release pipeline to avoid publishing concrete GitHub releases for pushes to the main branch while still publishing artifacts.

  • Update GoReleaser configuration to conditionally disable releases
  • Modify the GitHub Actions workflow to set GORELEASER_DISABLE_RELEASE for main branch pushes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.goreleaser.yaml Adds a conditional disable setting for release via environment variable
.github/workflows/release.yaml Adjusts workflow steps to set the GORELEASER_DISABLE_RELEASE variable for pushes to main

if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
continue-on-error: true
run: |
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a comment to clarify that this line conditionally disables the release publishing on main branch pushes, improving readability for future maintainers.

Suggested change
run: |
run: |
# Disable release publishing when a push is made to the main branch.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none labels May 27, 2025
@timflannagan
Copy link
Member Author

FYI @nfuden

@@ -173,6 +173,7 @@ docker_manifests:
changelog:
disable: true
release:
disable: '{{ if isEnvSet "GORELEASER_DISABLE_RELEASE" }}{{ .Env.GORELEASER_DISABLE_RELEASE }}{{ else }}false{{ end }}'
Copy link
Member Author

Choose a reason for hiding this comment

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

Only affects GH releases. Doesn't affect container image (or helm chart) publishing.

@timflannagan timflannagan added this pull request to the merge queue May 28, 2025
Merged via the queue into kgateway-dev:main with commit 7ec07e4 May 28, 2025
27 of 28 checks passed
@timflannagan timflannagan deleted the chore/disable-release-main branch May 28, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants