fix(ci): release workflow dispatches release-announcement (#106)#107
Merged
Conversation
GitHub does not propagate `release: published` events to downstream workflows when the release is created by another workflow using the default GITHUB_TOKEN (anti-infinite-loop guard). This caused the release-announcement workflow to never fire on v1.0.1 and v1.0.2 - both had to be posted manually via `gh api graphql createDiscussion`. Fix: - release-announcement.yml: add `workflow_dispatch` trigger with a required `tag` string input. Body construction branches on `github.event_name` - when dispatched, fetch the release body via `gh release view` rather than reading the (absent) release event payload. Prerelease/draft filter still applies on the release event path; on dispatch the operator owns the decision. - release.yml: new final job `announce` (needs: goreleaser, skipped on dry_run and on prerelease tags) that invokes `gh workflow run release-announcement.yml -f tag=...`. Job declares `actions: write` per-job because `workflow_dispatch` is one of the two event types that GITHUB_TOKEN can trigger. - governance_test.go: TestGovernance_ReleaseAnnouncementWorkflow extended to pin the new trigger + dispatch body path; new TestGovernance_ReleaseWorkflowDispatchesAnnouncement asserts the release workflow contains the dispatch step with the right permissions and dependencies. v1.0.2 was already announced manually; v1.0.3 and onwards will announce themselves. Closes #106.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #106. Adds workflow_dispatch path to release-announcement.yml + dispatch step in release.yml so v1.0.3+ auto-announces. Governance tests updated.
Closes #106.