-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci(release): Switch from action-prepare-release to Craft #18763
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: develop
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
f89e6b1 to
b9ae430
Compare
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 🔧
Other
🤖 This preview updates automatically when you update the PR. |
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
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.
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/auto-release.yml
Outdated
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
| branches: | ||
| - master | ||
|
|
||
| # This workflow tirggers a release when merging a branch with the pattern `prepare-release/VERSION` into master. | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (or "auto") | ||
| required: false | ||
| force: | ||
| 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.
.github/workflows/auto-release.yml
Outdated
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
| branches: | ||
| - master | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (or "auto") | ||
| required: false | ||
| force: | ||
| description: Force a release even when there are release-blockers | ||
| required: false | ||
| merge_target: |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.github/workflows/release.yml
Outdated
| - name: Prepare release | ||
| uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| merge_target: ${{ inputs.merge_target }} | ||
| craft_config_from_merge_target: 'true' |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.github/workflows/auto-release.yml
Outdated
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 # v2 # v1 |
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.
q: Are all these version bumps actually related? The version comments are a bit confusing here
.github/workflows/release.yml
Outdated
| required: false | ||
| merge_target: | ||
| description: Target branch to merge into. Uses the default branch as a fallback (optional) | ||
| description: Target branch to merge into |
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.
q: How does craft handle this case?
.github/workflows/release.yml
Outdated
| release: | ||
| runs-on: ubuntu-24.04 | ||
| name: 'Release a new version' | ||
| runs-on: ubuntu-latest |
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.
m: I think pinning to latest would make our CI more brittle here, is this required?
.github/workflows/auto-release.yml
Outdated
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| 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.
Optional version input lacks default value
Low Severity
The version input was changed from required: true to required: false, with the description updated to "(or 'auto')". However, no default value was added. If a user triggers the workflow without providing a version, github.event.inputs.version passes an empty string to the Craft action rather than "auto". This could cause unexpected behavior if Craft doesn't treat empty strings equivalently to "auto" versioning.
Summary
This PR migrates from the deprecated
action-prepare-releaseto the new Craft GitHub Actions.Changes
.github/workflows/auto-release.ymlto Craft reusable workflowDocumentation
See https://getsentry.github.io/craft/github-actions/ for more information.
Closes #18765 (added automatically)