Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 9, 2026

Summary

This PR migrates from the deprecated action-prepare-release to the new Craft GitHub Actions.

Changes

  • Migrated .github/workflows/release.yml to Craft reusable workflow

Documentation

See https://getsentry.github.io/craft/github-actions/ for more information.

#skip-changelog

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
@BYK BYK requested a review from lucas-zimerman as a code owner January 9, 2026 17:58
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

BYK added 2 commits January 9, 2026 23:08
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.
Comment on lines 26 to 36
- 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.

Comment on lines +35 to +36
version: ${{ inputs.version }}
force: ${{ inputs.force }}

This comment was marked as outdated.

Comment on lines +30 to +36
- name: Prepare release
uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ inputs.version }}
force: ${{ inputs.force }}
Copy link

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

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a 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

@lucas-zimerman lucas-zimerman merged commit 916f566 into main Jan 12, 2026
27 of 28 checks passed
@lucas-zimerman lucas-zimerman deleted the ci/migrate-to-craft-action branch January 12, 2026 14:15
@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented Jan 12, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants