Skip to content

Release

Release #254

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
force:
description: Force a release even when there are release-blockers (optional)
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
required: false
jobs:
prepare_framework:
runs-on: macos-13-xlarge
name: 'Create XCFramework'
steps:
- uses: actions/checkout@v4
- name: 'Generate XCFramework'
run: |
./scripts/ci-select-xcode.sh 15.2
make bump-version TO=${{ github.event.inputs.version }}
# We need to build the framework during release to get it's SHA value
# the framework will be saved as an artefact and we will use the same
# binary for the entire release process to avoid the SHA to change
make build-xcframework
- uses: actions/upload-artifact@v4
with:
name: xcframeworks.zip
path: |
Carthage/Sentry.xcframework.zip
Carthage/Sentry-Dynamic.xcframework.zip
Carthage/SentrySwiftUI.xcframework.zip
Carthage/Sentry-WithoutUIKitOrAppKit.zip
overwrite: true
job_release:
runs-on: ubuntu-latest
name: 'Release a new version'
needs: prepare_framework
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: xcframeworks.zip
path: Carthage/
# update-package-sha.sh uses this env variable to update Package.swift.
# During release Craft calls bump.sh that uses update-package-sha.sh.
- run: export GITHUB_RUN_ID=${{ github.run_id }}
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
merge_target: ${{ github.event.inputs.merge_target }}