-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (39 loc) · 1.95 KB
/
build_ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# From https://medium.com/team-rockstars-it/the-easiest-way-to-build-a-flutter-ios-app-using-github-actions-plus-a-key-takeaway-for-developers-48cf2ad7c72a
name: "Build IPA Package"
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Install flutter
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
# Install your project's dependencies
- run: flutter pub get
- run: pod update
working-directory: ios
- name: Flutter build
run: flutter build ios --release --no-codesign
- run: mkdir Payload
working-directory: build/ios/iphoneos
- run: mv Runner.app/ Payload
working-directory: build/ios/iphoneos
- run: zip -qq -r -9 PrescoreFlutter.ipa Payload
working-directory: build/ios/iphoneos
# Collect the file and upload as artifact
- name: collect ipa artifacts
uses: actions/upload-artifact@v3
with:
name: release-ipa
# Path to the release files
path: build/ios/iphoneos/*.ipa
- name: Upload R2 IPA
run: AWS_ACCESS_KEY_ID=${{ secrets.R2_SECRET_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.R2_SECRET_KEY }} aws s3 cp PrescoreFlutter.ipa s3://matrix-app-dist/actions/prescore_flutter_ipa/${{ github.run_number }}/ --acl public-read --no-progress --endpoint-url https://62a009fecd6c4069e4a928d203e3e493.r2.cloudflarestorage.com/
working-directory: build/ios/iphoneos
- name: Upload COS IPA
run: AWS_ACCESS_KEY_ID=${{ secrets.COS_SECRET_ID }} AWS_SECRET_ACCESS_KEY=${{ secrets.COS_SECRET_KEY }} aws s3 cp PrescoreFlutter.ipa s3://app-dist-1307054264/actions/prescore_flutter_ipa/${{ github.run_number }}/ --acl public-read --no-progress --endpoint-url https://cos.accelerate.myqcloud.com/
working-directory: build/ios/iphoneos