ci(release): Switch from action-prepare-release to Craft#1858
ci(release): Switch from action-prepare-release to Craft#1858
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 - Update .craft.yml with versioning.policy: calver
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: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} |
There was a problem hiding this comment.
Bug: The scheduled release workflow passes empty strings for inputs.version and inputs.force to the craft action, which may cause the run to fail.
Severity: HIGH
Suggested Fix
Conditionally provide a default value for the inputs when the workflow is triggered by a schedule. For example, you can use a ternary expression to default to 'auto' for the version: version: ${{ github.event_name == 'workflow_dispatch' && inputs.version || 'auto' }}. A similar approach can be used for the force input if needed.
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#L37-L38
Potential issue: The `release.yml` workflow is configured to run on both
`workflow_dispatch` and a `schedule`. When triggered by the schedule, the `inputs`
context is empty. Consequently, empty strings are passed for the `version` and `force`
parameters to the `getsentry/craft` action. It is unconfirmed how the `craft` action
handles empty string inputs for these parameters. This could potentially lead to a
failure during the automated, scheduled release process if the action does not have a
fallback or default behavior.
Did we get this right? 👍 / 👎 to inform future reviews.
|
I think this is ready to be merged? |
Summary
This PR migrates from the deprecated
action-prepare-releaseto the new Craft GitHub Actions.Changes
.github/workflows/release.ymlto Craft reusable workflow.craft.ymlwithversioning.policy: calverDocumentation
See https://getsentry.github.io/craft/github-actions/ for more information.