-
Notifications
You must be signed in to change notification settings - Fork 572
ci(release): Switch from action-prepare-release to Craft #5290
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
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧
🤖 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
| merge_target: ${{ github.event.inputs.merge_target }} | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@v1 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
sentrivana
left a comment
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.
Thanks for updating! ❤️ Left some comments
.github/workflows/ci.yml
Outdated
|
|
||
| steps: | ||
| - uses: actions/checkout@v6.0.1 | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 # v6 # v2.0.1 |
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.
Is this an intentional downgrade to 2.0? Also in other files
.github/workflows/release.yml
Outdated
| merge_target: ${{ github.event.inputs.merge_target }} | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 # v2 # v2 |
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.
Extra comments here and in other places
| 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.
If not provided, does this default to auto? If not, should we add logic to L38's version: ${{ inputs.version }} to set to auto if not provided?
| 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.
Missing default value for optional version input
High Severity
The version input was changed from required: true to required: false with a description mentioning "(or 'auto')", but no default value is specified. When a user triggers this workflow without providing a version, inputs.version will be an empty string rather than "auto". This will likely cause the Craft action to fail or behave unexpectedly. Either add default: auto to the input definition, or use a fallback expression like version: ${{ inputs.version || 'auto' }} on line 38.
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.