ci: add macOS (DMG) and Windows (ZIP) build jobs
Some checks failed
Some checks failed
- mac-runner: builds macOS .dmg with flutter build macos - windows-runner: builds Windows .zip with flutter build windows - Both depend on test passing before building
This commit is contained in:
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@@ -68,3 +68,52 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: habo-linux
|
name: habo-linux
|
||||||
path: build/linux/x64/release/bundle/
|
path: build/linux/x64/release/bundle/
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
needs: test
|
||||||
|
runs-on: mac-runner
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/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-windows:
|
||||||
|
needs: test
|
||||||
|
runs-on: windows-runner
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: '3.35.7'
|
||||||
|
- name: Get dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
- name: Build Windows
|
||||||
|
run: flutter build windows --release
|
||||||
|
- name: Create ZIP
|
||||||
|
run: |
|
||||||
|
cd build/windows/x64/runner/Release
|
||||||
|
Compress-Archive -Path * -DestinationPath habo-windows.zip
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: habo-windows
|
||||||
|
path: build/windows/x64/runner/Release/habo-windows.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user