-
-
Notifications
You must be signed in to change notification settings - Fork 465
ci(release): Switch from action-prepare-release to Craft #5014
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
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Build / dependencies / internal 🔧Deps
Other
Other
🤖 This preview updates automatically when you update the PR. |
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| abfcc92 | 309.54 ms | 380.32 ms | 70.78 ms |
| fcec2f2 | 357.47 ms | 447.32 ms | 89.85 ms |
| bbc35bb | 298.53 ms | 372.17 ms | 73.64 ms |
| ee747ae | 357.79 ms | 421.84 ms | 64.05 ms |
| d15471f | 315.20 ms | 370.22 ms | 55.02 ms |
| b77456b | 393.26 ms | 441.10 ms | 47.84 ms |
| d15471f | 310.26 ms | 377.04 ms | 66.78 ms |
| ee747ae | 386.94 ms | 431.43 ms | 44.49 ms |
| fc5ccaf | 279.11 ms | 353.34 ms | 74.23 ms |
| d15471f | 286.65 ms | 314.68 ms | 28.03 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| abfcc92 | 1.58 MiB | 2.13 MiB | 557.31 KiB |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| bbc35bb | 1.58 MiB | 2.12 MiB | 553.01 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| b77456b | 1.58 MiB | 2.12 MiB | 548.11 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| fc5ccaf | 1.58 MiB | 2.13 MiB | 557.54 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
Previous results on branch: ci/migrate-to-craft-action
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 56d0c00 | 323.38 ms | 372.06 ms | 48.68 ms |
| 9f55129 | 346.65 ms | 424.39 ms | 77.73 ms |
| 33b3380 | 297.58 ms | 360.82 ms | 63.24 ms |
| b302000 | 378.71 ms | 443.14 ms | 64.43 ms |
| 191040f | 355.24 ms | 437.35 ms | 82.10 ms |
| 096e94b | 425.78 ms | 524.83 ms | 99.05 ms |
| 197db59 | 362.33 ms | 478.15 ms | 115.81 ms |
| bc797ff | 340.28 ms | 391.70 ms | 51.42 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 56d0c00 | 1.58 MiB | 2.20 MiB | 633.88 KiB |
| 9f55129 | 1.58 MiB | 2.20 MiB | 633.89 KiB |
| 33b3380 | 1.58 MiB | 2.20 MiB | 633.90 KiB |
| b302000 | 1.58 MiB | 2.20 MiB | 633.89 KiB |
| 191040f | 1.58 MiB | 2.20 MiB | 633.89 KiB |
| 096e94b | 1.58 MiB | 2.20 MiB | 633.90 KiB |
| 197db59 | 1.58 MiB | 2.20 MiB | 633.89 KiB |
| bc797ff | 1.58 MiB | 2.20 MiB | 633.89 KiB |
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 | ||
| required: true | ||
| 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, but the downstream craft action might expect the literal string 'auto' for automatic versioning, causing potential failure.
Severity: HIGH
Suggested Fix
To remove ambiguity, explicitly set the default value of the version input to 'auto'. This ensures that if a user does not provide a version, the workflow will correctly trigger the automatic versioning feature of the craft action as intended. Update the input definition to version: { description: 'Version to release (or ''auto'')', required: false, default: 'auto' }.
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-L7
Potential issue: The `release.yml` workflow introduces an optional `version` input for
the `workflow_dispatch` trigger. If a user does not provide a value, GitHub Actions will
pass an empty string `""` to the `getsentry/action-craft` action. The intended behavior
for automatic versioning is to use the string `'auto'`. It is unclear whether the
`craft` action correctly interprets an empty string as a request for automatic version
detection or if it specifically requires the literal string `'auto'`. This ambiguity
could lead to a failure in the release process if the action does not handle the empty
string case as expected.
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.