-
-
Notifications
You must be signed in to change notification settings - Fork 77
ci(release): Switch from action-prepare-release to Craft #1186
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⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. 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.
| - 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.
| - name: Install Dependencies | ||
| run: yarn install |
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 is missing a setup-node action before the yarn install step, which will cause the job to fail as Node.js and Yarn will be unavailable.
Severity: CRITICAL
🔍 Detailed Analysis
The release.yml workflow runs yarn install and a pre-release script requiring Node.js, but it lacks a step to set up the Node.js environment. This omission will cause the yarn install command to fail because the yarn executable will not be available. Subsequently, the pre-release script invoked by the Craft action will also fail when it tries to execute npm version and node commands, blocking the entire release process.
💡 Suggested Fix
Add a uses: actions/setup-node@v4 step between the actions/checkout step and the Install Dependencies step to ensure Node.js and Yarn are available in the runner environment.
🤖 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#L33-L34
Potential issue: The `release.yml` workflow runs `yarn install` and a pre-release script
requiring Node.js, but it lacks a step to set up the Node.js environment. This omission
will cause the `yarn install` command to fail because the `yarn` executable will not be
available. Subsequently, the pre-release script invoked by the Craft action will also
fail when it tries to execute `npm version` and `node` commands, blocking the entire
release process.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8473499
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.