Skip to content

Commit bfe2648

Browse files
authored
Merge pull request #1159 from BranchMetrics/CORE-2483-add-no-idfa-prebuilt-binaries
CORE-2483 update build upload to include prebuild no idfa frameworks
2 parents cf55947 + 6e2ec9b commit bfe2648

File tree

1 file changed

+76
-4
lines changed

1 file changed

+76
-4
lines changed

.github/workflows/release.yml

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Build & Release (manual)
44
# $ gh workflow run release.yml
55
on: workflow_dispatch
66

7-
# Builds two frameworks in parallel, then commits checksums, releases
8-
# with the frameworks and checksums attached to the release.
7+
# Builds four frameworks in parallel, then commits checksums
8+
# releases with the frameworks and checksums attached to the release.
99
jobs:
1010
build:
1111
runs-on: macos-latest
@@ -28,6 +28,27 @@ jobs:
2828
carthage-files/build/Branch.zip
2929
carthage-files/build/checksum
3030
31+
build-noidfa:
32+
runs-on: macos-latest
33+
steps:
34+
- name: Check out code
35+
uses: actions/checkout@v2
36+
- name: Build xcframework
37+
working-directory: carthage-files
38+
run: |
39+
xcodebuild -scheme Branch-xcframework-noidfa
40+
cd build
41+
zip -rqy Branch_noidfa.zip Branch.xcframework/
42+
echo '#checksum for Branch_noidfa.zip on Github' > checksum_noidfa
43+
shasum Branch_noidfa.zip >> checksum_noidfa
44+
- name: Upload build artifacts
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: framework-noidfa
48+
path: |
49+
carthage-files/build/Branch_noidfa.zip
50+
carthage-files/build/checksum_noidfa
51+
3152
build-static:
3253
runs-on: macos-latest
3354
steps:
@@ -39,7 +60,7 @@ jobs:
3960
xcodebuild -scheme Branch-static-xcframework
4061
cd build
4162
zip -rqy Branch_static.zip Branch.xcframework/
42-
echo '#checksum for Branch-static.zip on Github' > checksum_static
63+
echo '#checksum for Branch_static.zip on Github' > checksum_static
4364
shasum Branch_static.zip >> checksum_static
4465
- name: Upload build artifacts
4566
uses: actions/upload-artifact@v2
@@ -49,6 +70,27 @@ jobs:
4970
carthage-files/build/Branch_static.zip
5071
carthage-files/build/checksum_static
5172
73+
build-static-noidfa:
74+
runs-on: macos-latest
75+
steps:
76+
- name: Check out code
77+
uses: actions/checkout@v2
78+
- name: Build static xcframework
79+
working-directory: carthage-files
80+
run: |
81+
xcodebuild -scheme Branch-static-xcframework-noidfa
82+
cd build
83+
zip -rqy Branch_static_noidfa.zip Branch.xcframework/
84+
echo '#checksum for Branch_static_noidfa.zip on Github' > checksum_static_noidfa
85+
shasum Branch_static_noidfa.zip >> checksum_static_noidfa
86+
- name: Upload build artifacts
87+
uses: actions/upload-artifact@v2
88+
with:
89+
name: static-framework-noidfa
90+
path: |
91+
carthage-files/build/Branch_static_noidfa.zip
92+
carthage-files/build/checksum_static_noidfa
93+
5294
release:
5395
runs-on: macos-latest
5496
needs: [build, build-static]
@@ -81,14 +123,16 @@ jobs:
81123
- name: Relocate checksum artifacts
82124
run: |
83125
cp framework/checksum carthage-files
126+
cp framework-noidfa/checksum_noidfa carthage-files
84127
cp static-framework/checksum_static carthage-files
128+
cp static-framework-noidfa/checksum_static_noidfa carthage-files
85129
# The sha output from this step is the commit to be tagged.
86130
- name: Commit checksums
87131
id: commit-checksums
88132
run: |
89133
git config user.name "Branch SDK Team"
90134
git config user.email [email protected]
91-
git commit carthage-files/checksum carthage-files/checksum_static -m'Updated checksums'
135+
git commit carthage-files/checksum carthage-files/checksum_noidfa carthage-files/checksum_static carthage-files/checksum_static_noidfa -m'Updated checksums'
92136
echo "::set-output name=sha::$(git rev-parse HEAD)"
93137
# TODO: Version bump along the way, probably here.
94138
- name: Push changes
@@ -142,27 +186,55 @@ jobs:
142186
assetName: 'Branch.zip',
143187
path: 'framework/Branch.zip',
144188
});
189+
await uploadAsset({
190+
github,
191+
context,
192+
releaseId,
193+
assetName: 'Branch_noidfa.zip',
194+
path: 'framework-noidfa/Branch_noidfa.zip',
195+
});
145196
await uploadAsset({
146197
github,
147198
context,
148199
releaseId,
149200
assetName: 'Branch_static.zip',
150201
path: 'static-framework/Branch_static.zip',
151202
});
203+
await uploadAsset({
204+
github,
205+
context,
206+
releaseId,
207+
assetName: 'Branch_static_noidfa.zip',
208+
path: 'static-framework-noidfa/Branch_static_noidfa.zip',
209+
});
152210
await uploadAsset({
153211
github,
154212
context,
155213
releaseId,
156214
assetName: 'checksum',
157215
path: 'framework/checksum',
158216
});
217+
await uploadAsset({
218+
github,
219+
context,
220+
releaseId,
221+
assetName: 'checksum_noidfa',
222+
path: 'framework-noidfa/checksum_noidfa',
223+
});
159224
await uploadAsset({
160225
github,
161226
context,
162227
releaseId,
163228
assetName: 'checksum_static',
164229
path: 'static-framework/checksum_static',
165230
});
231+
await uploadAsset({
232+
github,
233+
context,
234+
releaseId,
235+
assetName: 'checksum_static_noidfa',
236+
path: 'static-framework-noidfa/checksum_static_noidfa',
237+
});
166238
- name: Report Release
167239
uses: actions/github-script@v4
168240
with:

0 commit comments

Comments
 (0)