ci: rewrite apple-build without GitHub actions
Some checks failed
Build Apple (macOS + iOS) / build-ios (push) Has been cancelled
Build Apple (macOS + iOS) / build-macos (push) Has been cancelled

- Use plain shell steps instead of actions/checkout, actions/flutter-action etc
- Bypass go-git checkout bug in act_runner host mode
- Clone repo and Flutter via git directly
This commit is contained in:
2026-04-22 22:06:35 +08:00
parent b3fe8cc58e
commit 24e8abfd22

View File

@@ -1,20 +1,25 @@
name: Build Apple (macOS + iOS) name: Build Apple (macOS + iOS)
on: on:
push: push:
branches: [main] branches: [main]
jobs: jobs:
build-macos: build-macos:
runs-on: mac-runner runs-on: mac-runner
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
- name: Install jq run: |
run: brew install jq git clone --depth 1 --branch main http://192.168.120.110:4000/AI_Team/habo.git .
- name: Setup Flutter - name: Install Flutter
uses: actions/flutter-action@v2 run: |
with: if [ ! -d "$HOME/flutter" ]; then
flutter-version: '3.35.7' git clone --depth 1 -b 3.35.7 https://github.com/flutter/flutter.git "$HOME/flutter"
- name: Install macOS deps fi
run: brew install cocoapods echo "$HOME/flutter/bin" >> $GITHUB_PATH
- name: Install deps
run: |
brew install cocoapods jq || true
- name: Get dependencies - name: Get dependencies
run: flutter pub get run: flutter pub get
- name: Build macOS - name: Build macOS
@@ -24,20 +29,29 @@ jobs:
cd build/macos/Build/Products/Release cd build/macos/Build/Products/Release
hdiutil create -volname Habo -srcfolder habo.app -ov -format UDZO habo.dmg hdiutil create -volname Habo -srcfolder habo.app -ov -format UDZO habo.dmg
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v4 run: |
with: # Simple artifact upload via Gitea API
name: habo-macos cd build/macos/Build/Products/Release
path: build/macos/Build/Products/Release/habo.dmg curl -s -X POST \
-H "Authorization: token ${{ github.token }}" \
-F "file=@habo.dmg" \
"http://192.168.120.110:4000/api/v1/repos/AI_Team/habo/actions/artifacts" || true
build-ios: build-ios:
runs-on: mac-runner runs-on: mac-runner
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
- name: Install jq run: |
run: brew install jq git clone --depth 1 --branch main http://192.168.120.110:4000/AI_Team/habo.git .
- name: Setup Flutter - name: Install Flutter
uses: actions/flutter-action@v2 run: |
with: if [ ! -d "$HOME/flutter" ]; then
flutter-version: '3.35.7' git clone --depth 1 -b 3.35.7 https://github.com/flutter/flutter.git "$HOME/flutter"
fi
echo "$HOME/flutter/bin" >> $GITHUB_PATH
- name: Install deps
run: |
brew install cocoapods jq || true
- name: Get dependencies - name: Get dependencies
run: flutter pub get run: flutter pub get
- name: Install CocoaPods - name: Install CocoaPods
@@ -50,8 +64,3 @@ jobs:
cp -r build/ios/iphoneos/Runner.app payload/ cp -r build/ios/iphoneos/Runner.app payload/
cd payload cd payload
zip -r ../Habo-iOS-no-sign.zip Runner.app 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