Skip to content

Commit 304ee4b

Browse files
authored
chore: setup iOS pipeline (#2622)
1 parent c24f9c4 commit 304ee4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+186
-108
lines changed

.github/actions/ios/action.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,20 @@ runs:
2525
flutter pub get
2626
pod install --repo-update
2727
28-
- name: Build iOS IPA
28+
- name: Build iOS IPA (No code signing for PRs)
29+
if: ${{ github.event_name == 'pull_request' }}
2930
shell: bash
3031
env:
31-
VERSION_NAME: ${{inputs.VERSION_NAME}}
32-
VERSION_CODE: ${{inputs.VERSION_CODE}}
32+
VERSION_NAME: ${{ inputs.VERSION_NAME }}
33+
VERSION_CODE: ${{ inputs.VERSION_CODE }}
3334
run: |
34-
flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE
35+
flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE
36+
37+
- name: Build iOS IPA (With Code Signing)
38+
if: ${{ github.event_name != 'pull_request' }}
39+
shell: bash
40+
env:
41+
VERSION_NAME: ${{ inputs.VERSION_NAME }}
42+
VERSION_CODE: ${{ inputs.VERSION_CODE }}
43+
run: |
44+
flutter build ipa --build-name $VERSION_NAME --build-number $VERSION_CODE

.github/workflows/push-event.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Push
22

33
on:
44
push:
5-
branches: ["flutter"]
5+
branches: [ "flutter" ]
66

77
jobs:
88
common:
@@ -151,15 +151,37 @@ jobs:
151151
run: |
152152
bash scripts/prep-ios-key.sh
153153
154+
- name: Setup Certs
155+
if: ${{ github.repository == 'fossasia/pslab-android' }}
156+
env:
157+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
158+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
159+
run: |
160+
cd ./iOS
161+
git clone --branch=fastlane-ios --depth=1 https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} fastlane
162+
fastlane setupCertificates
163+
if [[ $? -ne 0 ]]; then
164+
exit 1
165+
fi
166+
154167
- name: iOS Workflow
155168
uses: ./.github/actions/ios
156169
with:
157170
VERSION_NAME: ${{needs.common.outputs.VERSION_NAME}}
158171
VERSION_CODE: ${{needs.common.outputs.VERSION_CODE}}
159172

173+
- name: Push app to testflight
174+
if: ${{ github.repository == 'fossasia/pslab-android' }}
175+
run: |
176+
cd ./iOS
177+
fastlane uploadToBeta
178+
if [[ $? -ne 0 ]]; then
179+
exit 1
180+
fi
181+
160182
update-release:
161183
name: Update Draft Release
162-
needs: [common, android, ios]
184+
needs: [ common, android, ios ]
163185
runs-on: ubuntu-latest
164186
steps:
165187
- name: Run Release Drafter

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
1111
key.properties
1212
**/*.keystore
1313
**/*.jks
14+
fastlane.json

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<application
33
android:label="PSLab"
44
android:name="${applicationName}"
5-
android:icon="@mipmap/ic_launcher">
5+
android:icon="@mipmap/launcher_icon">
66
<activity
77
android:name=".MainActivity"
88
android:exported="true"
-544 Bytes
Binary file not shown.
2.71 KB
Loading
-442 Bytes
Binary file not shown.
1.87 KB
Loading
Binary file not shown.
3.63 KB
Loading

0 commit comments

Comments
 (0)