Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: Build macOS
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
paths:
|
|
- 'lib/**'
|
|
- 'macos/**'
|
|
- 'pubspec.yaml'
|
|
- '.github/workflows/build-macos.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'lib/**'
|
|
- 'macos/**'
|
|
- 'pubspec.yaml'
|
|
- '.github/workflows/build-macos.yml'
|
|
|
|
env:
|
|
FLUTTER_VERSION: '3.41.5'
|
|
|
|
jobs:
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
channel: 'stable'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build macOS
|
|
run: flutter build macos --release
|
|
|
|
- name: Package macOS
|
|
run: |
|
|
mkdir -p dist
|
|
APP=$(find build/macos/Build/Products/Release -maxdepth 1 -name "*.app" | head -1)
|
|
ditto -c -k --keepParent "$APP" dist/Komet-macos.zip
|
|
|
|
- name: Upload macOS artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: komet-macos
|
|
path: dist/Komet-macos.zip
|
|
if-no-files-found: error
|
|
retention-days: 30
|