ci(release): Switch from action-prepare-release to Craft#58
Open
ci(release): Switch from action-prepare-release to Craft#58
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.
Comment on lines
6
to
+8
| version: | ||
| description: Version to release | ||
| required: true | ||
| description: Version to release (or "auto") | ||
| required: false |
There was a problem hiding this comment.
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.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.