-
Notifications
You must be signed in to change notification settings - Fork 51
ci(release): Switch from action-prepare-release to Craft #831
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. Bug Fixes 🐛
Build / dependencies / internal 🔧
🤖 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
| uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| merge_target: ${{ inputs.merge_target }} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.github/workflows/release.yml
Outdated
| uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} |
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.yml workflow incorrectly calls getsentry/craft@v2 as a composite action within steps. It should be invoked as a reusable workflow at the job level.
Severity: CRITICAL
🔍 Detailed Analysis
The release.yml workflow attempts to call getsentry/craft@v2 from within a job's steps. However, version 2 of getsentry/craft provides reusable workflows, not composite actions. Reusable workflows must be invoked at the job level using jobs.<job-id>.uses:. This incorrect invocation pattern will cause the workflow to fail at runtime, blocking the release process. The changelog-preview.yml file in this same pull request demonstrates the correct job-level invocation pattern for a v2 workflow.
💡 Suggested Fix
Modify the release.yml workflow to call getsentry/craft as a reusable workflow. Instead of calling it within steps, define a job that uses getsentry/craft/.github/workflows/release.yml@v2 at the job level, similar to how changelog-preview.yml is structured.
🤖 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#L34-L39
Potential issue: The `release.yml` workflow attempts to call `getsentry/craft@v2` from
within a job's `steps`. However, version 2 of `getsentry/craft` provides reusable
workflows, not composite actions. Reusable workflows must be invoked at the job level
using `jobs.<job-id>.uses:`. This incorrect invocation pattern will cause the workflow
to fail at runtime, blocking the release process. The `changelog-preview.yml` file in
this same pull request demonstrates the correct job-level invocation pattern for a v2
workflow.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8427911
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.