-
-
Notifications
You must be signed in to change notification settings - Fork 1
ci(release): Switch from action-prepare-release to Craft #161
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
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Build / dependencies / internal 🔧
🤖 This preview updates automatically when you update the PR. |
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - labeled |
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.
Don't know why this is needed here. This repository has existing backwards compatibility checks in its CI config.
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.
You don't need it. We can remove if you don't think the changelog preview is not useful.
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.
I don't think it is useful. Most folks are doing releases with fewer than 5 changes in them.
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.
| 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: The optional version input defaults to an empty string, not "auto", causing the getsentry/craft action to fail when the version is omitted during manual trigger.
Severity: HIGH
🔍 Detailed Analysis
The release.yml workflow's version input was changed from required to optional, with the description implying a default of "auto". However, when the workflow is triggered without this input, GitHub Actions provides an empty string ("") instead of null. This empty string is passed to the getsentry/craft@v2 action's version parameter. The craft action validates this input and rejects empty strings, causing the workflow to fail at runtime. The workflow is missing logic to convert the empty string input to the expected "auto" value.
💡 Suggested Fix
Modify the workflow to explicitly default the version to "auto" when the inputs.version is an empty string. This can be done by setting a variable before the craft step, for example: VERSION: ${{ inputs.version == '' && 'auto' || inputs.version }}, and then passing $VERSION to the action.
🤖 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-L7
Potential issue: The `release.yml` workflow's `version` input was changed from required
to optional, with the description implying a default of "auto". However, when the
workflow is triggered without this input, GitHub Actions provides an empty string (`""`)
instead of `null`. This empty string is passed to the `getsentry/craft@v2` action's
`version` parameter. The `craft` action validates this input and rejects empty strings,
causing the workflow to fail at runtime. The workflow is missing logic to convert the
empty string input to the expected "auto" value.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8427849
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.