-
-
Notifications
You must be signed in to change notification settings - Fork 30
ci(release): Switch from action-prepare-release to Craft #58
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: master
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. New Features ✨
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.
| version: | ||
| description: Version to release | ||
| required: true | ||
| description: Version to release (or "auto") | ||
| required: false |
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: When the version input is omitted in the release workflow, an empty string is passed to the craft action, which may not be handled correctly.
Severity: HIGH
Suggested Fix
To ensure the intended behavior, explicitly default the version input to 'auto' when it is not provided. Change the input to the craft action to version: ${{ github.event.inputs.version || 'auto' }}. This will correctly trigger the automatic version determination feature.
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#L6-L8
Potential issue: The `version` input for the `workflow_dispatch` trigger was changed to
be optional. When a user triggers this workflow without providing a version, GitHub
Actions will pass an empty string `''` as the value for `github.event.inputs.version`.
This empty string is then passed directly to the `getsentry/craft` action. It is unclear
how the craft action handles an empty string for its `version` parameter. This could
lead to a failure in the release process if the action does not correctly interpret the
empty string as a request for automatic version determination, which is the intended
behavior when no version is specified.
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.