-
-
Notifications
You must be signed in to change notification settings - Fork 38
ci(release): Switch from action-prepare-release to Craft #1072
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
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. This PR will not appear in the changelog. 🤖 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: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
| - name: Prepare release | ||
| uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| - name: Prepare release | ||
| 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 workflow may be missing the necessary Node.js and dependency installation steps required by the preReleaseCommand script.
Severity: HIGH
🔍 Detailed Analysis
The release.yml workflow was updated to use the getsentry/craft action, but the steps for setting up Node.js and installing dependencies via corepack enable and yarn install were removed. The preReleaseCommand configured in .craft.yml executes scripts/craft-pre-release.sh, which runs npm and node commands. If the getsentry/craft action does not handle Node.js environment setup and dependency installation internally, the release workflow will fail because npm and node will not be available in the execution environment.
💡 Suggested Fix
Before the getsentry/craft action step, re-add steps to set up the required Node.js version and install dependencies. This typically involves using the actions/setup-node action and running corepack enable and yarn install, similar to what was done in the previous version of the workflow.
🤖 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#L30-L36
Potential issue: The `release.yml` workflow was updated to use the `getsentry/craft`
action, but the steps for setting up Node.js and installing dependencies via `corepack
enable` and `yarn install` were removed. The `preReleaseCommand` configured in
`.craft.yml` executes `scripts/craft-pre-release.sh`, which runs `npm` and `node`
commands. If the `getsentry/craft` action does not handle Node.js environment setup and
dependency installation internally, the release workflow will fail because `npm` and
`node` will not be available in the execution environment.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8473278
lucas-zimerman
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.
LGTM! Thank you :D
|
Hi @BYK, by any chance, are there any other changes required for this PR? I just tested the release workflow and it seems to be failing: https://github.com/getsentry/sentry-capacitor/actions/runs/20922580045 EDIT: Same is happening on getsentry/sentry-cordova#408 |
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.
#skip-changelog