Skip to content

Commit 8cb59ea

Browse files
authored
Merge pull request #13 from NTUT-NPC/CI
Ci
2 parents 9be4984 + 2455a7b commit 8cb59ea

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/CI.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
- name: Upload APK Artifact
116116
uses: actions/upload-artifact@v4
117117
with:
118-
name: release-apk-${{ env.BUILD_TIMESTAMP }}
118+
name: release-apk-${{ env.RELEASE_NAME }}-${{ env.BUILD_TIMESTAMP }}
119119
path: build/app/outputs/flutter-apk/app-debug.apk
120120

121121
# - name: Create Pre-release and Upload Assets
@@ -155,7 +155,14 @@ jobs:
155155
- name: update build numbers
156156
run: |
157157
dart ./scripts/update_version.dart --ci
158-
# Updating pod files
158+
- name: Get App Version
159+
run: |
160+
VERSION=$(grep '^version:' pubspec.yaml | cut -d ' ' -f 2)
161+
BASE_VERSION=$(echo $VERSION | cut -d '+' -f 1)
162+
BUILD_NUMBER=$(echo $VERSION | cut -d '+' -f 2)
163+
echo "RELEASE_NAME=$BASE_VERSION ($BUILD_NUMBER)" >> $GITHUB_ENV
164+
165+
# Updating pod files
159166
- name: Pod file update
160167
run: |
161168
cd ios
@@ -208,24 +215,25 @@ jobs:
208215
if: env.SHOULD_SIGN_IOS == 'true'
209216
run: flutter build ipa --release --export-options-plist=ios/ExportOptions.plist
210217

218+
# IPA file detection.
219+
- name: Detect path for ipa file
220+
if: env.SHOULD_SIGN_IOS == 'true'
221+
run: |
222+
echo "IPA_PATH=$(find build/ios/ipa -type f -name '*.ipa')" >> $GITHUB_ENV
211223
- name: 'Upload app to TestFlight'
212224
uses: apple-actions/upload-testflight-build@v3
213225
with:
214-
app-path: 'build/ios/ipa/*.ipa'
226+
app-path: '${{ env.IPA_PATH }}'
215227
issuer-id: ${{ secrets.IOS_APPSTORE_API_ISSUER_ID}}
216228
api-key-id: ${{ secrets.IOS_APPSTORE_API_KEY_ID }}
217229
api-private-key: ${{ secrets.IOS_APPSTORE_API_PRIVATE_KEY }}
218230

219231

220-
# IPA file detection.
221-
- name: Detect path for ipa file
222-
if: env.SHOULD_SIGN_IOS == 'true'
223-
run: |
224-
echo "IPA_PATH=$(find build/ios/ipa -type f -name '*.ipa')" >> $GITHUB_ENV
232+
225233

226234
- name: Upload IPA Artifact
227235
if: env.SHOULD_SIGN_IOS == 'true'
228236
uses: actions/upload-artifact@v4
229237
with:
230-
name: release-ipa-${{ env.BUILD_TIMESTAMP }}
238+
name: release-ipa--${{ env.RELEASE_NAME }}-${{ env.BUILD_TIMESTAMP }}
231239
path: build/ios/ipa/*.ipa

ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@
4545
<true/>
4646
<key>UIApplicationSupportsIndirectInputEvents</key>
4747
<true/>
48+
<key>ITSAppUsesNonExemptEncryption</key>
49+
<false/>
4850
</dict>
4951
</plist>

0 commit comments

Comments
 (0)