Skip to content

Release

Release #245

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: Check out current commit (${{ github.sha }})
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RELEASE_PAT }}
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: ${{ secrets.GH_RELEASE_PAT }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
merge_target: ${{ github.event.inputs.merge_target }}