diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00263a5ff..8959a1890 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,6 +162,12 @@ jobs: needs: get-flutter-version + env: + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }} + APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }} + CERTIFICATE_PRIVATE_KEY: ${{ secrets.CERTIFICATE_PRIVATE_KEY }} + steps: - uses: actions/checkout@v4 @@ -191,7 +197,6 @@ jobs: run: | mkdir Payload cp -R build/ios/iphoneos/Runner.app Payload - - name: Create IPA (Unsigned) run: zip -r aria-${{ github.ref_name }}.ipa Payload @@ -208,32 +213,44 @@ jobs: files: aria-${{ github.ref_name }}.ipa draft: true + - name: Install codemagic-cli-tools + run: pip install codemagic-cli-tools + + - name: Fetch signing files + run: > + app-store-connect fetch-signing-files com.poppingmoon.aria + --platform IOS + --type IOS_APP_STORE + --create + + - name: Set up keychain + run: keychain initialize + + - name: Add certificates + run: keychain add-certificates + + - name: Update Xcode project settings + run: xcode-project use-profiles + - name: Create xcarchive - if: startsWith(github.ref, 'refs/tags/') working-directory: ios run: > xcodebuild archive - CODE_SIGNING_ALLOWED=NO -workspace Runner.xcworkspace -scheme Runner -configuration Release -archivePath Runner.xcarchive - - - name: Dump AuthKey - if: startsWith(github.ref, 'refs/tags/') - run: echo "${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}" > AuthKey.p8 + -allowProvisioningUpdates - name: Create IPA if: startsWith(github.ref, 'refs/tags/') + working-directory: ios run: > xcodebuild -exportArchive - -archivePath ios/Runner.xcarchive - -exportOptionsPlist ios/ExportOptions.plist + -archivePath Runner.xcarchive + -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates - -authenticationKeyIssuerID ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} - -authenticationKeyID ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }} - -authenticationKeyPath $(pwd)/AuthKey.p8 build-windows-x64: runs-on: windows-latest @@ -309,13 +326,11 @@ jobs: APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }} APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }} + CERTIFICATE_PRIVATE_KEY: ${{ secrets.CERTIFICATE_PRIVATE_KEY }} steps: - uses: actions/checkout@v4 - - name: Dump cert_key - run: echo "${{ secrets.CERT_KEY }}" > cert_key - - name: Install codemagic-cli-tools run: pip install codemagic-cli-tools @@ -324,14 +339,12 @@ jobs: app-store-connect fetch-signing-files com.poppingmoon.aria --platform MAC_OS --type MAC_APP_STORE - --certificate-key=@file:cert_key --create - name: Fetch certificates run: > app-store-connect certificates list --type MAC_INSTALLER_DISTRIBUTION - --certificate-key=@file:cert_key --save - name: Set up keychain @@ -353,8 +366,14 @@ jobs: - name: Get dependencies run: flutter pub get + - name: Get build name + id: get-build-name + run: | + build_name=$(grep version pubspec.yaml | sed 's/[^0-9]*\([0-9.]*\).*/\1/') + echo build-name=$build_name >> $GITHUB_OUTPUT + - name: Build for macOS - run: flutter build macos + run: flutter build macos --build-name ${{ steps.get-build-name.outputs.build-name }} - name: Install create-dmg run: brew install create-dmg diff --git a/ios/ExportOptions.plist b/ios/ExportOptions.plist index da9e1e9e6..5ab1dee3d 100644 --- a/ios/ExportOptions.plist +++ b/ios/ExportOptions.plist @@ -9,7 +9,7 @@ manageAppVersionAndBuildNumber method - app-store + app-store-connect signingStyle automatic stripSwiftSymbols diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1576ccad8..0d9c9fff4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -109,7 +109,7 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - sqflite (0.0.3): + - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - SwiftyGif (5.4.5) @@ -148,7 +148,7 @@ DEPENDENCIES: - rust_lib_aria (from `.symlinks/plugins/rust_lib_aria/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) - wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`) @@ -211,8 +211,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - sqflite: - :path: ".symlinks/plugins/sqflite/darwin" + sqflite_darwin: + :path: ".symlinks/plugins/sqflite_darwin/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" video_player_avfoundation: @@ -252,7 +252,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2006f8087..9be47f8e9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -572,6 +572,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -604,7 +605,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; @@ -705,6 +705,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -761,6 +762,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -795,7 +797,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; @@ -826,7 +827,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 96aadabb0..8551a177c 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -37,7 +37,7 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - sqflite (0.0.3): + - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - url_launcher_macos (0.0.1): @@ -68,7 +68,7 @@ DEPENDENCIES: - rust_lib_aria (from `Flutter/ephemeral/.symlinks/plugins/rust_lib_aria/macos`) - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`) + - sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`) - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) @@ -111,8 +111,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos shared_preferences_foundation: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin - sqflite: - :path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin + sqflite_darwin: + :path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos video_player_avfoundation: @@ -135,12 +135,12 @@ SPEC CHECKSUMS: image_editor_common: 1b11f59fad8909bafcdaa0f31cc9373425b58600 just_audio: 9b67ca7b97c61cfc9784ea23cd8cc55eb226d489 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 - package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c + package_info_plus: d2f71247aab4b6521434f887276093acc70d214c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 rust_lib_aria: 793a1cb9897092ee3e848adb8d284dee13466e34 - share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf + share_plus: a182a58e04e51647c0481aadabbc4de44b3a2bce shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13 url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3 wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269