diff --git a/.github/workflows/prerelease_ios.yml b/.github/workflows/prerelease_ios.yml index ffe8356..69f96f4 100644 --- a/.github/workflows/prerelease_ios.yml +++ b/.github/workflows/prerelease_ios.yml @@ -49,6 +49,11 @@ jobs: run: | flutter build ios --release --no-codesign --dart-define=SENTRY_DSN=${{ secrets.SENTRY_DSN }} + - name: Dump Secrets + run: | + cd ios/ + echo "${{secrets.CONNECT_KEY}}" > ci.p8 + - name: Deploy to TestFlight run: | cd ./ios && bundle exec fastlane beta_ci diff --git a/README.md b/README.md index a70d4a4..cf42926 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ flutter pub run flutter_launcher_icons:main ``` | Env Var | Value | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|----------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | APPLE_ID | apple account email" | | APP_IDENTIFIER | ios com.blabla.blabla | | PLAY_APP_IDENTIFIER | android com.blablabla.bla | @@ -53,7 +53,7 @@ flutter pub run flutter_launcher_icons:main | FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD | app specific password for fastlane | | FASTLANE_USER | documented in fastlane | | FASTLANE_PASSWORD | documented in fastlane | -| FASTLANE_SESSION | documented in fastlane | +| CONNECT_KEY | app store connect .p8 file contents | | GOOGLE_PLAY_JSON_CONTENT | base64 encoded json keys for google play fastlane | | KEYSTORE | base64 encoded keystore.jks | | KEY_PROPERTIES | key.properties seen above | diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index fef7344..9c23393 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -28,7 +28,15 @@ platform :ios do ) build_app(workspace: "Runner.xcworkspace", scheme: "Runner") - upload_to_testflight(skip_waiting_for_build_processing: true) + api_key = app_store_connect_api_key( + key_id: "DSZ32H33CL", + issuer_id: "fb8accf3-4375-49f8-9bd0-449e0ef34160", + key_filepath: "./ci.p8", + # duration: 1200, # optional (maximum 1200) + # in_house: false # optional but may be required if using match/sigh + ) + + upload_to_testflight(skip_waiting_for_build_processing: true, api_key: api_key) end desc "Push a new beta build to TestFlight on CI"