-
-
Notifications
You must be signed in to change notification settings - Fork 376
ci(release): Switch from action-prepare-release to Craft #7150
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Changelog Preview | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - labeled | ||
| jobs: | ||
| changelog-preview: | ||
| uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2 | ||
| secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,29 @@ | ||
| name: Upload XCFrameworks | ||
| on: | ||
| push: | ||
| branches: | ||
| - release/** | ||
|
|
||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (or "auto") | ||
| required: false | ||
| jobs: | ||
| # Craft uses the Git commit hash to query GitHub Actions for artifacts | ||
| # uploaded in a workflow run associated with that commit. | ||
| # | ||
| # To support this, we download the XCFramework already built and uploaded | ||
| # in release.yml (triggered via workflow_dispatch), and reupload it here. | ||
| # This associates it with the new commit in the release branch, which is | ||
| # created by getsentry/action-prepare-release in release.yml. | ||
| # | ||
| # This is necessary because Swift Package Manager requires a checksum for | ||
| # XCFrameworks, creating a chicken-and-egg problem: we need the XCFramework | ||
| # to generate the checksum, but we also need the checksum to update Package.swift. | ||
| # | ||
| # The sequence is: | ||
| # 1. Build the XCFrameworks in release.yml. | ||
| # 2. getsentry/action-prepare-release updates Package.swift with the checksum. | ||
| # 3. Upload the XCFrameworks again here so Craft can find it by commit. | ||
| upload-xcframeworks: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| name: Release a new version | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Get Release workflow run ID | ||
| run: echo "FRAMEWORK_RUN_ID=$(./scripts/xcframework-generated-run.sh)" >> $GITHUB_ENV | ||
|
|
||
| - uses: actions/download-artifact@v7 | ||
| with: | ||
| name: xcframeworks.zip | ||
| path: XCFrameworkBuildPath/ | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| run-id: ${{ env.FRAMEWORK_RUN_ID }} | ||
|
|
||
| - name: Archive XCFrameworks for Craft | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| # Craft uses the git commit hash of the release branch to download the release artifacts. | ||
| name: ${{ github.sha }} | ||
| if-no-files-found: error | ||
| overwrite: true | ||
| path: | | ||
| ${{github.workspace}}/XCFrameworkBuildPath/*.zip | ||
| - 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 | ||
| - name: Prepare release | ||
| uses: getsentry/craft@v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| path: '|' | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.