Files
eatvio_app/.gitea/workflows/test-flight-cd.yaml
2025-03-18 17:08:33 +03:00

67 lines
2.2 KiB
YAML

name: "Flutter Build & TestFlight Upload"
on:
pull_request:
branches:
- test-flight
jobs:
build:
runs-on: [macos-arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: flutter pub get
- name: Build iOS App
run: |
flutter build ipa \
--release \
--no-codesign
- name: Setup keychain and provisioning profiles
run: |
security create-keychain -p "" signing_temp.keychain
security default-keychain -s signing_temp.keychain
security unlock-keychain -p "" signing_temp.keychain
echo "${{ secrets.CERTIFICATES_FILE_BASE64 }}" | base64 --decode > certs.p12
security import certs.p12 -P "${{ secrets.CERTIFICATES_PASSWORD }}" -A
rm -f certs.p12
- name: Download provisioning profiles
uses: apple-actions/download-provisioning-profiles@v1
with:
profile-type: IOS_APP_STORE
bundle-id: com.eatvioapp.app
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
- name: Code signing
run: |
xcodebuild \
-workspace ios/Runner.xcworkspace \
-scheme Runner \
-archivePath build/Runner.xcarchive \
-sdk iphoneos \
-configuration Release \
clean archive \
CODE_SIGN_IDENTITY="iPhone Distribution" \
PROVISIONING_PROFILE_SPECIFIER="$(ls ~/Library/MobileDevice/Provisioning\ Profiles | head -n 1)"
- name: Export IPA
run: |
xcodebuild -exportArchive \
-archivePath build/Runner.xcarchive \
-exportPath build/ \
-exportOptionsPlist ios/exportOptions.plist
- name: Upload to TestFlight
uses: apple-actions/upload-testflight-build@v1
with:
app-path: build/EatvioApp.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}