From 60af5d2d4e0488cef9530590ca716a184fecd119 Mon Sep 17 00:00:00 2001 From: xiaohei Date: Wed, 22 Apr 2026 17:18:24 +0800 Subject: [PATCH] ci: add apple-build v2 --- .github/workflows/apple-build.yml | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/apple-build.yml diff --git a/.github/workflows/apple-build.yml b/.github/workflows/apple-build.yml new file mode 100644 index 0000000..e221359 --- /dev/null +++ b/.github/workflows/apple-build.yml @@ -0,0 +1,57 @@ +name: Build Apple (macOS + iOS) +on: + push: + branches: [main] +jobs: + build-macos: + runs-on: mac-runner + steps: + - uses: actions/checkout@v4 + - name: Install jq + run: brew install jq + - name: Setup Flutter + uses: actions/flutter-action@v2 + with: + flutter-version: '3.35.7' + - name: Install macOS deps + run: brew install cocoapods + - name: Get dependencies + run: flutter pub get + - name: Build macOS + run: flutter build macos --release + - name: Create DMG + run: | + cd build/macos/Build/Products/Release + hdiutil create -volname Habo -srcfolder habo.app -ov -format UDZO habo.dmg + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: habo-macos + path: build/macos/Build/Products/Release/habo.dmg + build-ios: + runs-on: mac-runner + steps: + - uses: actions/checkout@v4 + - name: Install jq + run: brew install jq + - name: Setup Flutter + uses: actions/flutter-action@v2 + with: + flutter-version: '3.35.7' + - name: Get dependencies + run: flutter pub get + - name: Install CocoaPods + run: cd ios && pod install + - name: Build iOS + run: flutter build ios --release --no-codesign --no-tree-shake-icons + - name: Package .app + run: | + mkdir -p payload + cp -r build/ios/iphoneos/Runner.app payload/ + cd payload + zip -r ../Habo-iOS-no-sign.zip Runner.app + - name: Upload iOS artifact + uses: actions/upload-artifact@v4 + with: + name: habo-ios-no-sign + path: Habo-iOS-no-sign.zip