@@ -13,18 +13,9 @@ permissions:
13
13
contents : write
14
14
15
15
jobs :
16
- deploy-sdk :
17
- name : Deploy SDK
18
- strategy :
19
- matrix :
20
- include :
21
- # - target: publishIosArm64PublicationToSonatypeRepository
22
- # os: macos-latest
23
- - target : :shared:publishAllPublicationsToMavenCentralRepository
24
- os : ubuntu-latest
25
- - target : :komoju-android-sdk:publishAllPublicationsToMavenCentralRepository
26
- os : ubuntu-latest
27
- runs-on : ${{ matrix.os }}
16
+ deploy-android-sdk :
17
+ name : Deploy Android SDK
18
+ runs-on : ubuntu-latest
28
19
steps :
29
20
- uses : actions/checkout@v4
30
21
- name : Validate Gradle Wrapper
@@ -50,24 +41,28 @@ jobs:
50
41
echo Version: TAG
51
42
echo "SDK_VERSION=${TAG#v}" >> $GITHUB_ENV
52
43
53
- - name : Deploy
54
- run : chmod +x gradlew && ./gradlew ${{ matrix.target }} --no-configuration-cache --no-daemon
44
+ - name : Build & Deploy
45
+ run : chmod +x gradlew && ./gradlew :shared:publishAllPublicationsToMavenCentralRepository :komoju-android-sdk:publishAllPublicationsToMavenCentralRepository --no-configuration-cache --no-daemon
55
46
env :
56
47
ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.OSSRH_USERNAME }}
57
48
ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.OSSRH_PASSWORD }}
58
49
ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.MEMORY_KEY }}
59
50
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
60
51
SDK_VERSION : ${{ env.SDK_VERSION }}
61
52
62
-
63
- deploy-app :
53
+ deploy-android-app :
64
54
name : Deploy Android App
65
- needs : deploy-sdk
55
+ needs : deploy-android- sdk
66
56
runs-on : ubuntu-latest
67
57
steps :
68
58
- uses : actions/checkout@v4
69
59
- name : Validate Gradle Wrapper
70
60
uses : gradle/actions/wrapper-validation@v4
61
+ - uses : actions/cache@v4
62
+ with :
63
+ path : |
64
+ ~/.konan
65
+ key : ${{ runner.os }}-${{ hashFiles('**/.lock') }}
71
66
- name : Set up JDK 17
72
67
uses : actions/setup-java@v4
73
68
with :
93
88
asset_name : soundBud-release.apk
94
89
make_latest : false
95
90
env :
96
- SDK_VERSION : ${{ env.SDK_VERSION }}
91
+ SDK_VERSION : ${{ env.SDK_VERSION }}
92
+
93
+ deploy-ios-sdk :
94
+ name : Deploy iOS SDK
95
+ runs-on : macos-latest-xlarge
96
+ steps :
97
+ - uses : actions/checkout@v4
98
+ - name : Validate Gradle Wrapper
99
+ uses : gradle/actions/wrapper-validation@v4
100
+ - uses : actions/cache@v4
101
+ with :
102
+ path : |
103
+ ~/.konan
104
+ key : ${{ runner.os }}-${{ hashFiles('**/.lock') }}
105
+ - uses : maxim-lobanov/setup-xcode@v1
106
+ with :
107
+ xcode-version : ' 16.0.0'
108
+ - name : Set up JDK 17
109
+ uses : actions/setup-java@v4
110
+ with :
111
+ distribution : zulu
112
+ java-version : 17
113
+ - name : Write release version
114
+ run : |
115
+ TAG=${{ github.event.release.tag_name }}
116
+ echo Version: TAG
117
+ echo "SDK_VERSION=${TAG#v}" >> $GITHUB_ENV
118
+ - name : Build Shared SDK framework
119
+ run : |
120
+ chmod +x gradlew && ./gradlew :shared:linkReleaseFrameworkIosArm64 :shared:linkReleaseFrameworkIosSimulatorArm64 --no-configuration-cache --no-daemon
121
+
122
+ rm -rf ./build/outputs/xcframework/KomojuSharedSDK.xcframework
123
+
124
+ xcodebuild -create-xcframework \
125
+ -framework ./shared/build/bin/iosArm64/releaseFramework/komojuShared.framework \
126
+ -framework ./shared/build/bin/iosSimulatorArm64/releaseFramework/komojuShared.framework \
127
+ -output ./build/outputs/xcframework/KomojuSharedSDK.xcframework
128
+
129
+ zip -r KomojuSharedSDK.zip ./build/outputs/xcframework/KomojuSharedSDK.xcframework
130
+
131
+ - name : Build Shared SDK Swift Wrapper
132
+ working-directory : ./komoju-ios-sdk
133
+ run : |
134
+ # Build & Archive for iOS
135
+ xcodebuild archive \
136
+ -scheme KomojuSDK \
137
+ -configuration Release \
138
+ -destination "generic/platform=iOS" \
139
+ -archivePath "./build/xcframework/komoju_ios.xcarchive" \
140
+ -sdk iphoneos \
141
+ ONLY_ACTIVE_ARCH=NO \
142
+ SKIP_INSTALL=NO \
143
+ BUILD_LIBRARY_FOR_DISTRIBUTION=YES
144
+
145
+
146
+ # Build & Archive for iOS Simulator
147
+ xcodebuild archive \
148
+ -scheme KomojuSDK \
149
+ -configuration Release \
150
+ -destination "generic/platform=iOS Simulator" \
151
+ -archivePath "./build/xcframework/komoju_ios_simulators.xcarchive" \
152
+ -sdk iphonesimulator \
153
+ ONLY_ACTIVE_ARCH=NO \
154
+ SKIP_INSTALL=NO \
155
+ BUILD_LIBRARY_FOR_DISTRIBUTION=YES
156
+
157
+ rm -rf ./build/outputs/xcframework/KomojuIosSDK.xcframework
158
+
159
+ xcodebuild -create-xcframework \
160
+ -framework ./build/xcframework/komoju_ios.xcarchive/Products/Library/Frameworks/KomojuSDK.framework \
161
+ -framework ./build/xcframework/komoju_ios_simulators.xcarchive/Products/Library/Frameworks/KomojuSDK.framework \
162
+ -output ./build/outputs/xcframework/KomojuIosSDK.xcframework
163
+
164
+ zip -r KomojuIosSDK.zip ./build/outputs/xcframework/KomojuIosSDK.xcframework
165
+ - name : Publish Shared SDK Framework!
166
+ uses : svenstaro/upload-release-action@v2
167
+ with :
168
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
169
+ file : KomojuSharedSDK.zip
170
+ make_latest : false
171
+ - name : Publish iOS SDK Framework!
172
+ uses : svenstaro/upload-release-action@v2
173
+ with :
174
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
175
+ file : komoju-ios-sdk/KomojuIosSDK.zip
176
+ make_latest : false
0 commit comments