-
-
Notifications
You must be signed in to change notification settings - Fork 279
ci(release): Switch from action-prepare-release to Craft #3440
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. Build / dependencies / internal 🔧Deps
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.
.github/workflows/release.yml
Outdated
| required: false | ||
| force: | ||
| description: Force a release even when there are release-blockers (optional) | ||
| description: Force a release even when there are release-blockers |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c0dde50 | 1268.90 ms | 1275.61 ms | 6.71 ms |
| ebccb5b | 1245.39 ms | 1249.31 ms | 3.92 ms |
| ea06d23 | 1254.02 ms | 1252.60 ms | -1.42 ms |
| 0fb3800 | 1256.60 ms | 1266.28 ms | 9.68 ms |
| 6ad8fc4 | 1263.70 ms | 1266.06 ms | 2.36 ms |
| bbdbcb9 | 1262.70 ms | 1261.86 ms | -0.84 ms |
| e5ae2a6 | 1240.48 ms | 1253.26 ms | 12.78 ms |
| d3fb366 | 1258.29 ms | 1260.79 ms | 2.51 ms |
| 7cfee3b | 1260.90 ms | 1273.14 ms | 12.24 ms |
| 765aa8b | 1259.09 ms | 1269.90 ms | 10.82 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c0dde50 | 5.53 MiB | 6.01 MiB | 488.14 KiB |
| ebccb5b | 5.53 MiB | 5.96 MiB | 444.86 KiB |
| ea06d23 | 5.53 MiB | 5.96 MiB | 443.26 KiB |
| 0fb3800 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 6ad8fc4 | 5.53 MiB | 6.01 MiB | 487.65 KiB |
| bbdbcb9 | 5.53 MiB | 6.02 MiB | 501.33 KiB |
| e5ae2a6 | 5.65 MiB | 6.09 MiB | 446.96 KiB |
| d3fb366 | 5.53 MiB | 6.01 MiB | 487.96 KiB |
| 7cfee3b | 20.70 MiB | 22.46 MiB | 1.75 MiB |
| 765aa8b | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: ci/migrate-to-craft-action
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| da9b49f | 1255.42 ms | 1258.11 ms | 2.69 ms |
| 5e3c97a | 1256.20 ms | 1260.06 ms | 3.87 ms |
| 94ea76f | 1255.94 ms | 1261.33 ms | 5.40 ms |
| 928e9a5 | 1261.73 ms | 1261.52 ms | -0.21 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| da9b49f | 5.65 MiB | 6.09 MiB | 446.95 KiB |
| 5e3c97a | 5.65 MiB | 6.09 MiB | 446.96 KiB |
| 94ea76f | 5.65 MiB | 6.09 MiB | 446.96 KiB |
| 928e9a5 | 5.65 MiB | 6.09 MiB | 446.96 KiB |
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f872f8e | 402.38 ms | 416.20 ms | 13.82 ms |
| ebccb5b | 363.79 ms | 371.10 ms | 7.31 ms |
| 75284dc | 512.39 ms | 530.87 ms | 18.48 ms |
| 2b5e090 | 437.21 ms | 467.14 ms | 29.93 ms |
| 32914d8 | 461.96 ms | 495.47 ms | 33.51 ms |
| d0aa4b6 | 395.66 ms | 393.13 ms | -2.53 ms |
| 51520fc | 351.89 ms | 349.79 ms | -2.10 ms |
| 114239b | 423.44 ms | 426.57 ms | 3.13 ms |
| 6e7d494 | 397.35 ms | 378.91 ms | -18.43 ms |
| 73dca78 | 476.53 ms | 522.21 ms | 45.68 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f872f8e | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| ebccb5b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 75284dc | 13.93 MiB | 14.93 MiB | 1.00 MiB |
| 2b5e090 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| 32914d8 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| d0aa4b6 | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 51520fc | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 114239b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 6e7d494 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| 73dca78 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
Previous results on branch: ci/migrate-to-craft-action
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5e3c97a | 401.46 ms | 411.65 ms | 10.20 ms |
| da9b49f | 370.69 ms | 374.10 ms | 3.41 ms |
| 94ea76f | 364.31 ms | 353.28 ms | -11.03 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5e3c97a | 14.09 MiB | 15.28 MiB | 1.19 MiB |
| da9b49f | 14.09 MiB | 15.28 MiB | 1.19 MiB |
| 94ea76f | 14.09 MiB | 15.28 MiB | 1.19 MiB |
| uses: getsentry/action-prepare-release@c8e1c2009ab08259029170132c384f03c1064c0e | ||
| uses: getsentry/craft@c6e2f04939b6ee67030588afbb5af76b127d8203 # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} |
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 release workflow will fail if the optional version input is not provided, as it passes an empty string to Craft which causes a validation error.
Severity: CRITICAL
Suggested Fix
To align with the intended behavior of defaulting to auto-versioning, modify the version parameter to handle an empty string. Change the line to version: ${{ github.event.inputs.version || 'auto' }}. This will ensure that if no version is supplied, 'auto' is passed to Craft instead of an empty string.
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#L38
Potential issue: The `release.yml` workflow was updated to make the `version` input
optional. When a user triggers this workflow via `workflow_dispatch` without providing a
version, GitHub Actions passes an empty string (`""`) for `github.event.inputs.version`.
This empty string is then passed directly to the Craft action. As evidenced by a past
incident ([Sentry issue #88068](https://sentry-st.sentry.io/issues/88068)), Craft will
reject an empty string with a validation error, causing the entire release workflow to
fail. This prevents releases when the supposedly optional version is omitted.
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.