update version #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |