-
-
Notifications
You must be signed in to change notification settings - Fork 0
ci(release): Switch from action-prepare-release to Craft #17
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
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.
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Build / dependencies / internal 🔧
Other
🤖 This preview updates automatically when you update the PR. |
.github/workflows/release.yml
Outdated
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 | ||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} |
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 may be missing the necessary Rust toolchain setup after switching to the getsentry/craft action, potentially causing the release process to fail.
Severity: HIGH
Suggested Fix
Verify whether the getsentry/craft action requires a pre-installed Rust environment. If it does, re-add a step to the release job to install the Rust toolchain, similar to the setup found in the other CI workflows.
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#L20-L25
Potential issue: The `release.yml` workflow was updated to use the `getsentry/craft`
action, and the explicit step for setting up the Rust toolchain was removed. Other
workflows in this repository, such as `ci.yml`, explicitly install the Rust toolchain
before running Rust-related commands. If the `getsentry/craft` action does not handle
the Rust toolchain setup internally, the release process will fail when it attempts to
execute commands like `cargo` to publish the crate.
Did we get this right? 👍 / 👎 to inform future reviews.
.github/workflows/release.yml
Outdated
| - name: Prepare release | ||
| uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # 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 fail because the explicit Rust toolchain setup was removed. The new getsentry/craft action might not install it automatically.
Severity: CRITICAL
Suggested Fix
Verify that the getsentry/craft action automatically installs the required Rust toolchain. If it does not, re-introduce the rustup toolchain install stable step into the release workflow before the action is called to ensure cargo is available.
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 workflow, which publishes the Rust crate to crates.io, has
been updated to use the `getsentry/craft` action, and the explicit Rust toolchain setup
steps have been removed. All other CI workflows in this repository explicitly install
the Rust toolchain before running `cargo` commands. If the `getsentry/craft` action does
not handle the installation of the Rust toolchain internally, the workflow will fail
when it attempts to execute `cargo` commands for publishing, thus breaking the release
process.
Did we get this right? 👍 / 👎 to inform future reviews.
|
Lint failure is unrelated to the changes in this PR |
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.