ci(release): Switch from action-prepare-release to Craft#214
ci(release): Switch from action-prepare-release to Craft#214
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 ✨Doctor
Other
Bug Fixes 🐛Ci
Other
Documentation 📚
Build / dependencies / internal 🔧
Other
Plus 59 more 🤖 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.
.github/workflows/release.yml
Outdated
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| uses: getsentry/action-prepare-release@v1 | ||
| uses: getsentry/craft@c6e2f04939b6ee67030588afbb5af76b127d8203 # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} |
There was a problem hiding this comment.
Bug: When the optional version input is not provided, an empty string is passed to the release action, which may not be handled as the expected "auto" value.
Severity: MEDIUM
Suggested Fix
Verify if the getsentry/craft action correctly handles an empty string for its version input. If it requires the literal string "auto", consider setting default: 'auto' for the workflow input to ensure the correct value is passed when none is provided.
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#L34
Potential issue: The `release.yml` workflow's `version` input was changed to be
optional. When a user triggers this workflow without providing a `version`, GitHub
Actions passes an empty string (`""`) to the `getsentry/craft` action. The input's
description, "(or 'auto')", suggests that the literal string `"auto"` might be the
expected value for automatic versioning. If the `craft` action does not treat an empty
string as equivalent to `"auto"`, the release process may fail 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.