1
+ name : iOS CD
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ type : string
8
+ description : " The version number of the release"
9
+ required : true
10
+ release_branch :
11
+ type : string
12
+ description : " The release branch with bumped version numbers for the release"
13
+ required : true
14
+
15
+ jobs :
16
+ build :
17
+ name : Build the binaries for the release and create a PR
18
+ runs-on : macos-13
19
+
20
+ steps :
21
+ - name : setup xcode
22
+ uses : maxim-lobanov/setup-xcode@v1
23
+ with :
24
+ xcode-version : ' 15.2'
25
+ - name : Checkout OneSignal-iOS-SDK
26
+ uses : actions/checkout@v4
27
+ with :
28
+ ref : ${{github.event.inputs.release_branch}}
29
+
30
+ - name : Install the Apple distribution certificate and provisioning profile
31
+ uses : apple-actions/import-codesign-certs@v2
32
+ with :
33
+ keychain-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
34
+ p12-file-base64 : ${{ secrets.CERTIFICATES_P12 }}
35
+ p12-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
36
+
37
+ - name : Install the Apple distribution certificate and provisioning profile
38
+ uses : apple-actions/import-codesign-certs@v2
39
+ with :
40
+ create-keychain : false # do not create a new keychain for this value
41
+ keychain-password : ${{ secrets.CERTIFICATES_P12_PASSWORD }}
42
+ p12-file-base64 : ${{ secrets.DEV_CERTIFICATES_P12 }}
43
+ p12-password : ${{ secrets.DEV_CERTIFICATES_P12_PASSWORD }}
44
+ # - name: Bump Version Number
45
+ # run: |
46
+ - name : Build Binaries
47
+ run : |
48
+ cd iOS_SDK/OneSignalSDK
49
+ chmod +x ./build_all_frameworks.sh
50
+ ./build_all_frameworks.sh
51
+ shell : bash
52
+ - name : Code Sign
53
+ run : |
54
+ cd iOS_SDK/OneSignalSDK
55
+ codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Core/OneSignalCore.xcframework
56
+ codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Extension/OneSignalExtension.xcframework
57
+ codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_Outcomes/OneSignalOutcomes.xcframework
58
+ codesign --timestamp -v --sign "Apple Distribution: OneSignal, Inc. (J3J28YJX9L)" OneSignal_XCFramework/OneSignal.xcframework
59
+ shell : bash
60
+ - name : Update Swift Package
61
+ run : |
62
+ cd iOS_SDK/OneSignalSDK
63
+ chmod +x ./update_swift_package.sh
64
+ ./update_swift_package.sh ${{github.event.inputs.version}}
65
+ shell : bash
66
+ - name : Commit Changes
67
+ run : |
68
+ git config --local user.email "[email protected] "
69
+ git config --local user.name "SyncR 🤖"
70
+ git add .
71
+ git commit -m "Release ${{github.event.inputs.version}}"
72
+
73
+ - name : Pushing changes
74
+ uses : ad-m/github-push-action@master
75
+ with :
76
+ github_token : ${{ secrets.GITHUB_TOKEN }}
77
+ repository : ' OneSignal/OneSignal-iOS-SDK'
78
+ force : true
79
+ branch : ${{github.event.inputs.release_branch}}
80
+
81
+ - name : " Submitting PR"
82
+
83
+ with :
84
+ route : POST /repos/{owner}/{repo}/pulls
85
+ owner : OneSignal
86
+ repo : OneSignal-iOS-SDK
87
+ head : ${{github.event.inputs.release_branch}}
88
+ base : player-model-main
89
+ title : |
90
+ "Release ${{github.event.inputs.version}}"
91
+ body : |
92
+ "Add Release Notes For Review Here"
93
+ env :
94
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments