-
-
Notifications
You must be signed in to change notification settings - Fork 318
68 lines (61 loc) · 2.24 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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 }}