-
-
Notifications
You must be signed in to change notification settings - Fork 60
ci(release): Switch from action-prepare-release to Craft #7631
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 - 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 🔧Deps
Other
Other
🤖 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 (optional) | ||
| description: Version to release (or "auto") | ||
| required: false | ||
| force: | ||
| description: Force a release even when there are release-blockers (optional) | ||
| description: Force a release even when there are release-blockers | ||
| 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 scheduled release.yml workflow passes empty strings for version and force inputs because no defaults are set, which may cause the craft action to fail.
Severity: MEDIUM
🔍 Detailed Analysis
The release.yml workflow is configured to run on a schedule. Scheduled triggers in GitHub Actions do not provide any inputs. The version and force inputs in this workflow lack default values, causing them to be passed as empty strings to the getsentry/craft action. While the action might be designed to handle this scenario (e.g., by defaulting to an "auto" version), this is an implicit dependency. If the craft action does not correctly handle empty string inputs, the scheduled release workflow will fail.
💡 Suggested Fix
To make the workflow's behavior explicit and prevent potential failures, set default values for the version and force inputs. For example, set version to "auto" and force to "false" to ensure the scheduled run behaves predictably.
🤖 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#L5-L10
Potential issue: The `release.yml` workflow is configured to run on a schedule.
Scheduled triggers in GitHub Actions do not provide any inputs. The `version` and
`force` inputs in this workflow lack `default` values, causing them to be passed as
empty strings to the `getsentry/craft` action. While the action might be designed to
handle this scenario (e.g., by defaulting to an "auto" version), this is an implicit
dependency. If the `craft` action does not correctly handle empty string inputs, the
scheduled release workflow will fail.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8433115
| NODE_VERSION: 20.8.1 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 |
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 want to revert back to a single commit, this creates random dependabot PRs to update those regularly. I'd rather keep the tag.
Also, it seems unrelated to your PR to have to change all theses since you're focusing on action-prepare-release.
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.