Skip to content

feat(release): trigger from Releases UI (release:published)#14

Merged
harikaduyu merged 2 commits into
mainfrom
add-release-published-trigger
May 22, 2026
Merged

feat(release): trigger from Releases UI (release:published)#14
harikaduyu merged 2 commits into
mainfrom
add-release-published-trigger

Conversation

@harikaduyu
Copy link
Copy Markdown
Contributor

What did you do?

  • Switched release.yml from push: tags: ["v*"] to release: types: [published]. Releases now fire when a release is published via the GitHub Releases UI or via gh release create vX.Y.Z.
  • Added release.mode: append to .goreleaser.yml so user-written notes from the UI are preserved (the auto-generated changelog and install footer are appended after the user's text).
  • Added release.replace_existing_artifacts: true so re-running the workflow on the same tag (e.g. after a transient failure) overwrites the tarballs instead of erroring.

Why did you do it?

Released v0.0.1 via git tag && git push origin v0.0.1 from the CLI, but the UI flow ("Draft a new release" → write notes → Publish) is more discoverable for future releases — both for us internally and for any external contributors. This change makes it the standard path.

Matches the pattern used in cli/cli, sigstore/cosign, jdx/mise, and other Go-CLI projects that drive releases from the Releases UI.

Behavior change

Before After
git push origin v0.0.X triggers release UI publish (or gh release create) triggers release
Push without UI publish → release Push without UI publish → no release

For the next release: visit https://github.com/Staffbase/gq/releases/new, pick or create a tag, write notes, click Publish release — workflow takes over from there.

Checklist

  • Tests added/updated — n/a (workflow + GoReleaser config only)
  • Documentation updated if needed — n/a (no user-facing CLI change; release process docs only if we add a CONTRIBUTING.md release section)

I validated locally with goreleaser check (config valid) and goreleaser release --snapshot --clean --skip=publish,before (all 4 platform tarballs build).


🤖 Generated with Claude Code.

Switch from `push: tags` to `release: published`. Releases are now
initiated from the GitHub Releases UI ("Draft a new release" → fill
notes → Publish) or via `gh release create vX.Y.Z`. Pushing a tag from
the CLI alone no longer triggers a release.

GoReleaser is configured with:

- `release.mode: append` so user-written notes from the UI are
  preserved; GoReleaser's auto-generated changelog and install footer
  are appended after the user's text.
- `release.replace_existing_artifacts: true` so re-running the workflow
  on the same tag (e.g. after a transient failure) overwrites the
  tarballs instead of erroring.

This matches the standard pattern in cli/cli, sigstore/cosign, mise,
and other Go projects that use the Releases UI as the release entry
point.

Co-Authored-By: Claude Opus 4.7
@harikaduyu harikaduyu marked this pull request as ready for review May 22, 2026 13:44
@harikaduyu harikaduyu requested a review from a team as a code owner May 22, 2026 13:44
Copy link
Copy Markdown
Contributor

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

Updates the release automation to be driven by publishing GitHub Releases (UI/gh), while preserving user-authored release notes and improving workflow re-run behavior for release assets.

Changes:

  • Switch GitHub Actions trigger from push on v* tags to release: published.
  • Configure GoReleaser to append generated content to existing release notes (release.mode: append).
  • Allow re-runs to overwrite existing release assets (release.replace_existing_artifacts: true).

Reviewed changes

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

File Description
.goreleaser.yml Appends generated changelog/footer to existing release notes and enables overwriting existing artifacts on reruns.
.github/workflows/release.yml Triggers the release workflow on GitHub Release publish events instead of tag pushes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 6
on:
push:
tags:
- "v*"
release:
types: [published]

Switching from `push: tags: ["v*"]` to `release: published` removed
the implicit tag filter — without a guard, any release publish (e.g.
a `nightly`, a date tag, or a typo) would run GoReleaser.

Add a job-level `if: startsWith(github.event.release.tag_name, 'v')`
to restore the original `v*` constraint at the new entry point.

Co-Authored-By: Claude Opus 4.7
@harikaduyu harikaduyu merged commit aeeeb2a into main May 22, 2026
9 checks passed
@harikaduyu harikaduyu deleted the add-release-published-trigger branch May 22, 2026 13:53
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants