-
-
Notifications
You must be signed in to change notification settings - Fork 19
ci(release): Switch from action-prepare-release to Craft #504
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
base: main
Are you sure you want to change the base?
Conversation
This PR migrates from the deprecated action-prepare-release to the new Craft GitHub Actions (reusable workflow or composite action). Changes: - Migrate .github/workflows/release.yml to Craft reusable workflow
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Build / dependencies / internal 🔧
🤖 This preview updates automatically when you update the PR. |
The previous migration incorrectly removed the GitHub App token authentication step. This commit restores it by switching to the composite action pattern which preserves the auth flow.
| pull-requests: write | ||
|
|
||
| jobs: |
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.
Bug: The optional force input lacks a default. If not provided, GitHub Actions passes an empty string, which could be misinterpreted by the downstream craft action, potentially forcing a release.
Severity: CRITICAL
Suggested Fix
To ensure predictable behavior, explicitly handle the empty string case. Add a default value for the force input, such as default: 'false', or use a conditional step to set a default if the input is an empty string, like force: ${{ github.event.inputs.force || 'false' }}.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/release.yml#L15-L17
Potential issue: The `release.yml` workflow defines the `force` input as optional
(`required: false`) without a default value. When a user triggers this workflow without
specifying the `force` input, GitHub Actions will pass an empty string `""` to the
`getsentry/craft@v2` action. The behavior of the `craft` action when receiving an empty
string for a boolean input is unknown. If it interprets an empty string as `true`, it
could lead to unintentionally forced releases even when release-blockers are present. If
it fails validation, the workflow will break.
Did we get this right? 👍 / 👎 to inform future reviews.
Summary
This PR migrates from the deprecated
action-prepare-releaseto the new Craft GitHub Actions.Changes
.github/workflows/release.ymlto Craft reusable workflowDocumentation
See https://getsentry.github.io/craft/github-actions/ for more information.