fix: dispatch releases explicitly after tagging#36
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bcbed8506
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| gh workflow run release.yml \ | ||
| --ref main \ | ||
| -f tag="${{ steps.create_tag.outputs.tag }}" |
There was a problem hiding this comment.
Gate manual dispatch to avoid duplicate release runs
This new gh workflow run release.yml call can trigger a second release for the same tag when RELEASE_PLEASE_TOKEN is configured, because Create tag if missing pushes with that token and release.yml still listens on push.tags. GitHub documents that events from GITHUB_TOKEN are suppressed except workflow_dispatch/repository_dispatch, but pushes made with a PAT do trigger downstream workflows, so this change can run GoReleaser twice for one version (typically causing one run to fail on existing release/formula artifacts). Consider dispatching only when the push used github.token, or removing/tag-scoping the push trigger.
Useful? React with 👍 / 👎.
Summary
tag-releasedispatchrelease.ymlexplicitly after creating a new release tag instead of relying on a tag-push workflow triggerrelease.ymlto accept an optional tag input so the dispatched run can check out the intended tag directlyVerification
ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release.yml"); YAML.load_file(".github/workflows/tag-release.yml"); puts "yaml ok"'git diff --checkRepo repair performed
v0.1.3andv0.1.4release-please, which found0 commitssincev0.1.4