ci: add apple-build v2
Some checks failed
Build Apple (macOS + iOS) / build-macos (push) Failing after 3s
Build Apple (macOS + iOS) / build-ios (push) Failing after 3s

This commit is contained in:
2026-04-22 17:18:24 +08:00
parent 59c58ab771
commit 60af5d2d4e

57
.github/workflows/apple-build.yml vendored Normal file
View File

@@ -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