-
Notifications
You must be signed in to change notification settings - Fork 31
56 lines (54 loc) · 2.19 KB
/
publish_to_testflight.yaml
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
51
52
53
54
55
56
name: Publish to Test Flight Flutter IOS
on:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
# 1
- name: Checkout code
uses: actions/checkout@v2
- name: Install Apple Certificate
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.BUILD_IOS_CERTIFICATE }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Install the provisioning profile
env:
PROVISIONING_CERTIFICATE_BASE64: ${{ secrets.PROVISIONING_PROFILE }}
BROADCAST_PROVISIONING_CERTIFICATE_BASE64: ${{ secrets.BROADCAST_PROVISIONING_PROFILE }}
run: |
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
BROADCAST_PP_PATH=$RUNNER_TEMP/build__broadcast_pp.mobileprovision
echo -n "$BROADCAST_PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $BROADCAST_PP_PATH
cp $BROADCAST_PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
# 2
# Setup the flutter environment.
- name: Create .env
run: touch .env
- name: Add AUTH URL
run: |
echo "VIDEOSDK_API_ENDPOINT=https://api.videosdk.live/v2" >>.env
echo "AUTH_TOKEN= ${{secrets.AUTH_TOKEN}}" >> .env
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.6"
channel: "stable"
# cache: true
# Build ipa.
- run: flutter build ipa
- name: Export ipa
run: xcodebuild -exportArchive -archivePath build/ios/archive/Runner.xcarchive -exportPath build-output/ios -exportOptionsPlist ios/ExportOptions.plist
# 3
- name: "Upload app to TestFlight"
uses: apple-actions/upload-testflight-build@v1
with:
app-path: "build-output/ios/Flutter VideoSDK App.ipa"
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}