From 34c33fdb7159136d821ba9a15a2ec41dd26fa7c6 Mon Sep 17 00:00:00 2001 From: canxin <69547456+canxin121@users.noreply.github.com> Date: Sat, 28 Sep 2024 19:15:00 +0800 Subject: [PATCH] Create build_ios_ipa.yml --- .github/workflows/build_ios_ipa.yml | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/build_ios_ipa.yml diff --git a/.github/workflows/build_ios_ipa.yml b/.github/workflows/build_ios_ipa.yml new file mode 100644 index 0000000..8b7ea06 --- /dev/null +++ b/.github/workflows/build_ios_ipa.yml @@ -0,0 +1,70 @@ +name: Build Ios Ipa +on: + workflow_dispatch: + +jobs: + get_version: + runs-on: ubuntu-latest + outputs: + app_version: ${{ steps.fetch_version.outputs.app_version }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Fetch Version + id: fetch_version + run: | + sudo snap install yq + app_version=$(yq eval '.version' pubspec.yaml) + echo "::set-output name=app_version::$app_version" + + build_and_push: + name: Build and Push Ios Ipa + needs: get_version + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Replace key + env: + SOME_SECRET_KEY: ${{ secrets.SOME_SECRET_KEY }} + SOME_REPLACE_KEY: ${{ secrets.SOME_REPLACE_KEY }} + SOME_REPLACE_FILE: ${{ secrets.SOME_REPLACE_FILE }} + run: | + chmod a+x tools/key_replace_macox_unknown + tools/key_replace_macox_unknown + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + + - name: Flutter Build Ios + run: |- + flutter build ios --release --no-codesign --verbose + + - name: Unbitcode + run: |- + chmod 777 tools/unbitcode.sh + sh tools/unbitcode.sh + + - name: Create Ipa + run: |- + mkdir -p Payload + mv ./build/ios/iphoneos/Runner.app Payload + zip -r -y AppRhyme_ios_unknown_${{ needs.get_version.outputs.app_version }}.ipa Payload/Runner.app + + - name: Upload AppImage Package + uses: actions/upload-artifact@v4 + with: + name: AppRhyme_ios_unknown_${{ needs.get_version.outputs.app_version }}_ipa + path: AppRhyme_ios_unknown_${{ needs.get_version.outputs.app_version }}.ipa + compression-level: 9