-
Notifications
You must be signed in to change notification settings - Fork 516
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
Avoid publishing GH releases for main branch pushes #11290
Conversation
Signed-off-by: timflannagan <timflannagan@gmail.com>
There was a problem hiding this 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: | |
There was a problem hiding this comment.
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.
run: | | |
run: | | |
# Disable release publishing when a push is made to the main branch. |
Copilot uses AI. Check for mistakes.
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 }}' |
There was a problem hiding this comment.
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.
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
Additional Notes
See #11286 for some context on this.