Skip to content

Commit db9572a

Browse files
authored
fix: Fix XCFramework version including commit sha on release (#5493)
* fix: Fix XCFramework version including commit sha on release * Update CHANGELOG.md
1 parent b714cb9 commit db9572a

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.github/workflows/assemble-xcframework-variant.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ on:
4545
type: string
4646
default: "iphoneos,iphonesimulator,macosx,maccatalyst,appletvos,appletvsimulator,watchos,watchsimulator,xros,xrsimulator"
4747

48+
release-version:
49+
description: |-
50+
For release workflows, the version to inject into the SDK.
51+
required: false
52+
type: string
53+
4854
jobs:
4955
assemble-xcframework-variant:
5056
name: Assemble ${{inputs.name}}${{inputs.suffix}} XCFramework Variant
@@ -70,11 +76,21 @@ jobs:
7076
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
7177
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
7278

79+
- name: Get version
80+
id: get-version
81+
run: |
82+
if [ -n "${{ inputs.release-version }}" ]; then
83+
echo "VERSION=${{ inputs.release-version }}" >> $GITHUB_ENV
84+
else
85+
echo "VERSION=$(grep MARKETING_VERSION Sources/Configuration/Versioning.xcconfig | cut -d ' ' -f 3)+${{ github.sha }}" >> $GITHUB_ENV
86+
fi
87+
shell: sh
88+
7389
- name: Compute cache key
7490
run: |
7591
sdks_string=${{inputs.sdks}}
7692
sdks_string_slugified=${sdks_string//,/_}
77-
echo "SENTRY_XCFRAMEWORK_CACHE_KEY=${{runner.os}}-xcframework-${{inputs.variant-id}}-$sdks_string_slugified-${{inputs.signed}}-${{hashFiles('Sources/**')}}-${{hashFiles('Sentry.xcodeproj/**')}}" >> $GITHUB_ENV
93+
echo "SENTRY_XCFRAMEWORK_CACHE_KEY=${{runner.os}}-xcframework-${{inputs.variant-id}}-$sdks_string_slugified-${{inputs.signed}}-${{env.VERSION}}-${{hashFiles('Sources/**')}}-${{hashFiles('Sentry.xcodeproj/**')}}" >> $GITHUB_ENV
7894
7995
- name: Restore XCFramework cache
8096
id: cache-xcframework

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
configuration-suffix: ${{matrix.variant.configuration-suffix}}
7979
variant-id: ${{matrix.variant.id}}
8080
signed: true
81+
release-version: ${{ github.event.inputs.version }}
8182
strategy:
8283
matrix:
8384
variant:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Fix XCFramework version including commit sha on release. (#5493)
8+
39
## 8.53.0
410

511
### Features

0 commit comments

Comments
 (0)