diff --git a/.github/workflows/deploy-ios.yaml b/.github/workflows/deploy-ios.yaml index c75c72aca..fd4f46dba 100644 --- a/.github/workflows/deploy-ios.yaml +++ b/.github/workflows/deploy-ios.yaml @@ -77,20 +77,36 @@ jobs: - name: Prebuild working-directory: app - run: flutter build ios --release --no-codesign + env: + APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + run: | + flutter build ipa --release --no-codesign + xcodebuild \ + -workspace ios/Runner.xcworkspace \ + -scheme Runner \ + -sdk iphoneos \ + -configuration Release archive \ + -archivePath build/ios/Runner.xcarchive \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO + + xcodebuild -exportArchive \ + -archivePath build/ios/Runner.xcarchive \ + -exportOptionsPlist ios/ExportOptions.plist \ + -exportPath build/ios/ipa -allowProvisioningUpdates \ + -authenticationKeyIssuerID ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} \ + -authenticationKeyID ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} \ + -authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}.p8 - name: Upload to App Store Connect + working-directory: app env: - FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} - MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} PRODUCE_USERNAME: ${{ secrets.PRODUCE_USERNAME }} - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false - APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} + APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} LANG: ja_JP.UTF-8 run: | - cd app/ios - echo '${{ secrets.APP_STORE_CONNECT_KEY }}' | base64 -d > AuthKey_HAZX33F4T7.p8 + cd app + echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > AuthKey_NGL2W4BQP6.p8 fastlane beta diff --git a/app/ios/ExportOptions.plist b/app/ios/ExportOptions.plist new file mode 100644 index 000000000..e3825bdfe --- /dev/null +++ b/app/ios/ExportOptions.plist @@ -0,0 +1,24 @@ + + + + + destination + export + generateAppStoreInformation + + manageAppVersionAndBuildNumber + + method + app-store-connect + signingStyle + automatic + stripSwiftSymbols + + teamID + CPL7H8SHVM + testFlightInternalTestingOnly + + uploadSymbols + + + diff --git a/app/ios/fastlane/Fastfile b/app/ios/fastlane/Fastfile index c21db3ff9..e4a56be8b 100644 --- a/app/ios/fastlane/Fastfile +++ b/app/ios/fastlane/Fastfile @@ -4,18 +4,14 @@ platform :ios do desc "Push a new beta build to TestFlight" lane :beta do app_store_connect_api_key( - key_id: "HAZX33F4T7", + key_id: "NGL2W4BQP6", issuer_id: "fd4cca56-716b-4f03-8e44-de72a03453db", - key_filepath: "./AuthKey_HAZX33F4T7.p8" + key_filepath: "./AuthKey_NGL2W4BQP6.p8" ) increment_build_number( build_number: latest_testflight_build_number + 1, xcodeproj: "Runner.xcodeproj", ) - # Step 2 - Download provisioning profiles and certificates - match( - readonly: true, - ) # Step 3 - Build the project build_app( diff --git a/app/ios/fastlane/Matchfile b/app/ios/fastlane/Matchfile deleted file mode 100644 index 3d859dcf6..000000000 --- a/app/ios/fastlane/Matchfile +++ /dev/null @@ -1,8 +0,0 @@ -git_url("git@github.com:YumNumm/EQMonitor_secret.git") - -storage_mode("git") - -type("appstore") # The default type, can be: appstore, adhoc, enterprise or development - -app_identifier(["net.yumnumm.eqmonitor", "net.yumnumm.eqmonitor.FcmServiceExtension"]) -username("yumnumm@icloud.com") # Your Apple Developer Portal username