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-upload-xcframework.yml to Craft reusable workflow

Documentation

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

Closes #7152

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
@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).


New Features ✨

  • Add isiOSAppOnVisionOS, isiOSAppOnMac, isMacCatalystApp to device context by philprime in #6939

Bug Fixes 🐛

  • (logs) Use sendDefaultPii and span_id for attributes by philprime in #7055
  • Fix incorrect variable assignment for 'sampled' key by xjshi in #7120
  • Mark dark theme deprecated by noahsmartin in #7114
  • Update raw_description in runtime context for Mac Catalyst App by philprime in #7082
  • Use correct parsing for stackframes by noahsmartin in #6908
  • Transport correctly handling 4xx and 5xx by dfed in #6618

Build / dependencies / internal 🔧

Deps

  • Bump ruby/setup-ruby from 1.276.0 to 1.279.0 by dependabot in #7117
  • Bump mikepenz/action-junit-report from 6.0.1 to 6.1.0 by dependabot in #7116
  • Update swiftlint version by github-actions in #7109
  • Bump ruby/setup-ruby from 1.275.0 to 1.276.0 by dependabot in #7103
  • Bump codecov/test-results-action from 1.1.1 to 1.2.1 by itaybre in #7087
  • Bump ruby/setup-ruby from 1.270.0 to 1.275.0 by itaybre in #7088
  • Bump peter-evans/create-pull-request from 7.0.11 to 8.0.0 by dependabot in #7084
  • Bump actions/download-artifact from 6 to 7 by dependabot in #7048
  • Bump aws-sdk-s3 from 1.205.0 to 1.208.0 by dependabot in #7074
  • Bump ruby/setup-ruby from 1.269.0 to 1.270.0 by dependabot in #7049
  • Update clang-format version by github-actions in #7056
  • Bump actions/cache from 4 to 5 by dependabot in #7052
  • Bump actions/upload-artifact from 5 to 6 by dependabot in #7050
  • Bump codecov/codecov-action from 5.5.1 to 5.5.2 by dependabot in #7051

Other

  • (release) Switch from action-prepare-release to Craft by BYK in #7150
  • Run visionOS tests on Cirrus Runners + Boot simulator by itaybre in #7147
  • Skip jobs/steps that require secrets for non contributors by itaybre in #7124
  • Add attributable protocol for typed attribute values by philprime in #7077
  • Allow alpha releases on RNSentry.podspec for Cross Platform Test by itaybre in #7130
  • Remove swift5.9 checks by itaybre in #7098
  • Remove duplicate file in project by itaybre in #7093
  • Convert SentryMetricKitIntegration to Swift by noahsmartin in #7076
  • Removes HybridSDK subspec by itaybre in #7019
  • Move testRemoveImageFromTail to flaky plan by itaybre in #7041
  • Use at least xcode 16 for all jobs by itaybre in #7012
  • Cleanup file filter for required files modified by itaybre in #7031
  • Remove assembly workflow files from UI test filter by itaybre in #7030
  • Bumps macOS-14 runner to macOS-15 by itaybre in #7029
  • Ensure required simulators are loaded for all platforms by itaybre in #7022

Other

  • test: Add Options Documentation Sync Tests by philipphofmann in #7075

🤖 This preview updates automatically when you update the PR.

Comment on lines 15 to 22
release:
uses: getsentry/craft/.github/workflows/release.yml@v2
with:
name: ${{matrix.variant.name}}
suffix: ${{matrix.variant.suffix}}
macho-type: ${{matrix.variant.macho-type}}
configuration-suffix: ${{matrix.variant.configuration-suffix}}
variant-id: ${{matrix.variant.id}}
release-version: ${{ github.event.inputs.version }}
sdk-list: ${{ needs.setup-matrix.outputs.sdk-list-array }}
strategy:
matrix:
variant: ${{ fromJson(needs.setup-matrix.outputs.slices) }}

assemble-xcframework-variant:
needs: [files-changed, build-xcframework-variant-slices, setup-matrix]
# Run the job only for PRs with related changes or non-PR events.
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_release_for_prs == 'true'
name: Assemble XCFramework Variant
uses: ./.github/workflows/assemble-xcframework-variant.yml
version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
path: '|'
secrets: inherit

This comment was marked as outdated.

version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
path: '|'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspicious pipe character value for path parameter

High Severity

The path parameter is set to '|' which is a single pipe character. This is not a valid file path and appears to be a typo or misconfiguration. In YAML, | is used for literal block scalars for multiline content, but when quoted as '|', it's just a string containing a pipe. This could cause the Craft release workflow to fail or behave unexpectedly since the value doesn't represent a valid path.

Fix in Cursor Fix in Web

description: Force a release even when there are release-blockers
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing XCFramework builds breaks preReleaseCommand execution

High Severity

The removal of the XCFramework build jobs breaks the release process. The .craft.yml defines a preReleaseCommand that runs bump.sh, which calls update-package-sha.sh. That script expects XCFramework zip files to exist in XCFrameworkBuildPath/ to calculate checksums for Package.swift. The old workflow built and assembled these frameworks before releasing, but the new workflow just calls the Craft reusable workflow without building anything, causing the preReleaseCommand to fail with missing file errors.

Fix in Cursor Fix in Web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like valid feedback, we use that command with the prebuilt binary to get the file hashes

description: Force a release even when there are release-blockers
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependent workflow expects removed xcframeworks.zip artifact

High Severity

The release-upload-xcframework.yml workflow (triggered on pushes to release/** branches) expects to download an artifact named xcframeworks.zip from the release workflow run ID stored in .github/last-release-runid. The old release.yml created and uploaded this artifact, but the new workflow doesn't produce it. When release-upload-xcframework.yml runs, the artifact download will fail because xcframeworks.zip no longer exists.

Fix in Cursor Fix in Web

Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a big change to the workflows.

I understand action-prepare-release is deprectated and shouldn't be used anymore.
But in this case, shouldn't only that step be changed and leave the other steps like before.

Also, have you confirmed this works for releasing sentry-cocoa with a beta release?

Comment on lines -5 to -12
push:
branches:
- main
- v8.x

pull_request:
types: [opened, synchronize, reopened, labeled]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be removed, we use this workflow to verify the framework builds on PRs and main

description: Force a release even when there are release-blockers
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like valid feedback, we use that command with the prebuilt binary to get the file hashes

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.
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 +18 to +28
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
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 will fail because it attempts to calculate checksums on XCFramework artifacts that are no longer being built or downloaded.
Severity: CRITICAL

🔍 Detailed Analysis

The updated release.yml workflow migrates to getsentry/craft@v2 but removes the preceding steps that built and downloaded XCFramework artifacts. The craft action executes a preReleaseCommand, bash ./scripts/bump.sh, which in turn calls ./scripts/update-package-sha.sh. This script attempts to calculate checksums for several .xcframework.zip files within the XCFrameworkBuildPath/ directory. Since these files are no longer built or downloaded, the shasum command will fail with a "No such file or directory" error. The script's set -euo pipefail option ensures this failure will halt the entire release workflow, preventing any new releases from completing.

💡 Suggested Fix

Reintroduce the necessary build jobs and artifact download steps into the release.yml workflow before the getsentry/craft@v2 action is called. The workflow must ensure that the required XCFramework ZIP files are present in the XCFrameworkBuildPath/ directory before the update-package-sha.sh script is executed.

🤖 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#L18-L28

Potential issue: The updated `release.yml` workflow migrates to `getsentry/craft@v2` but
removes the preceding steps that built and downloaded XCFramework artifacts. The `craft`
action executes a `preReleaseCommand`, `bash ./scripts/bump.sh`, which in turn calls
`./scripts/update-package-sha.sh`. This script attempts to calculate checksums for
several `.xcframework.zip` files within the `XCFrameworkBuildPath/` directory. Since
these files are no longer built or downloaded, the `shasum` command will fail with a "No
such file or directory" error. The script's `set -euo pipefail` option ensures this
failure will halt the entire release workflow, preventing any new releases from
completing.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8423777

required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
description: Target branch to merge into
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed PR and push triggers break CI validation

High Severity

The release.yml workflow previously triggered on push to main/v8.x branches and on pull_request events, running the full XCFramework build and validation pipeline. The reviewer explicitly noted: "This cannot be removed, we use this workflow to verify the framework builds on PRs and main." With only workflow_dispatch remaining, the XCFramework build, SPM validation, duplication tests, and app metrics jobs no longer run automatically, breaking CI verification for PRs and the required release-required-check status check.

Fix in Cursor Fix in Web

version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
path: '|'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing concurrency control enables race conditions in releases

Medium Severity

The old release.yml workflow included a concurrency configuration with explicit comments explaining it prevents "multiple release builds from running simultaneously, which could lead to race conditions in artifact generation and storage" and that "partial releases could corrupt our distribution pipeline." Both new workflows lack any concurrency control. If triggered multiple times (accidentally or otherwise), concurrent runs could create conflicting git tags, corrupt artifacts, or produce inconsistent release state.

Additional Locations (1)

Fix in Cursor Fix in Web

GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ inputs.version }}
path: '|'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XCFramework artifact handling removed from upload workflow

High Severity

The workflow previously triggered on push to release/** branches and handled XCFramework artifact re-uploading to associate them with the release branch commit (needed for Craft to find artifacts by commit hash). The old comments explained this solves a chicken-and-egg problem with Swift Package Manager checksums. The new workflow removes both the push trigger and all artifact handling, meaning Craft will not find the XCFramework artifacts when preparing the release.

Fix in Cursor Fix in Web

@BYK
Copy link
Member Author

BYK commented Jan 10, 2026

Closing this PR in favor of #7153 which takes a minimal approach.

Reason: This PR was too aggressive and removed essential build infrastructure:

  • Original workflow: 403 lines with 12+ complex XCFramework build jobs
  • This PR: 40 lines with just a Craft action call

The reviewers correctly identified that:

  1. XCFramework build steps are required for the preReleaseCommand to calculate checksums
  2. The PR/push triggers are needed for CI validation on PRs and main
  3. The concurrency settings prevent race conditions

The new PR #7153 only changes the action reference from action-prepare-release@v1 to craft@v2 while preserving all existing functionality.

@BYK BYK closed this Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(release): Switch from action-prepare-release to Craft

3 participants