From fd77a0894b198b76e75354a538a862d9f1b8ac81 Mon Sep 17 00:00:00 2001 From: klockky Date: Mon, 25 May 2026 11:15:43 +0000 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=B2=D0=BE=D1=80=D0=BA=D1=84=D0=BB=D0=BE=D1=83?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=B4=20iOS,=20macOS,=20Linux=20=D0=B8=20Window?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/build-ios.yml | 90 +++++++++++++++++++++++++++++ .github/workflows/build-linux.yml | 60 +++++++++++++++++++ .github/workflows/build-macos.yml | 56 ++++++++++++++++++ .github/workflows/build-windows.yml | 56 ++++++++++++++++++ 4 files changed, 262 insertions(+) create mode 100644 .github/workflows/build-ios.yml create mode 100644 .github/workflows/build-linux.yml create mode 100644 .github/workflows/build-macos.yml create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml new file mode 100644 index 0000000..29c898b --- /dev/null +++ b/.github/workflows/build-ios.yml @@ -0,0 +1,90 @@ +name: Build iOS + +on: + workflow_dispatch: + push: + branches: + - main + - master + paths: + - 'lib/**' + - 'ios/**' + - 'pubspec.yaml' + - '.github/workflows/build-ios.yml' + pull_request: + paths: + - 'lib/**' + - 'ios/**' + - 'pubspec.yaml' + - '.github/workflows/build-ios.yml' + +env: + FLUTTER_VERSION: '3.41.5' + +jobs: + build-ios: + 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 iOS (no codesign) + run: flutter build ios --release --no-codesign + + - name: Install ldid + run: brew install ldid + + - name: Pseudo-sign with ldid + run: | + set -euo pipefail + APP="build/ios/iphoneos/Runner.app" + ENT="$(mktemp -t ent).plist" + cat > "$ENT" <<'PLIST' + + + + + platform-application + get-task-allow + com.apple.private.security.no-container + + + PLIST + if [ -d "$APP/Frameworks" ]; then + find "$APP/Frameworks" -type f -name "*.dylib" -print0 | xargs -0 -I{} ldid -S "{}" + find "$APP/Frameworks" -type d -name "*.framework" | while read -r fw; do + bin="$fw/$(basename "$fw" .framework)" + [ -f "$bin" ] && ldid -S "$bin" + done + fi + if [ -d "$APP/PlugIns" ]; then + find "$APP/PlugIns" -type d -name "*.appex" | while read -r ext; do + bin="$ext/$(basename "$ext" .appex)" + [ -f "$bin" ] && ldid -S"$ENT" "$bin" + done + fi + ldid -S"$ENT" "$APP/Runner" + + - name: Package IPA + run: | + mkdir -p dist build/ios/Payload + cp -R build/ios/iphoneos/Runner.app build/ios/Payload/ + (cd build/ios && zip -qr ../../dist/Komet-ios-pseudosigned.ipa Payload) + + - name: Upload iOS artifact + uses: actions/upload-artifact@v4 + with: + name: komet-ios-pseudosigned + path: dist/Komet-ios-pseudosigned.ipa + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 0000000..d7d488c --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,60 @@ +name: Build Linux + +on: + workflow_dispatch: + push: + branches: + - main + - master + paths: + - 'lib/**' + - 'linux/**' + - 'pubspec.yaml' + - '.github/workflows/build-linux.yml' + pull_request: + paths: + - 'lib/**' + - 'linux/**' + - 'pubspec.yaml' + - '.github/workflows/build-linux.yml' + +env: + FLUTTER_VERSION: '3.41.5' + +jobs: + build-linux: + runs-on: ubuntu-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: Install Linux desktop dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev libjsoncpp-dev + + - name: Get dependencies + run: flutter pub get + + - name: Build Linux + run: flutter build linux --release + + - name: Package Linux + run: | + mkdir -p dist + tar -C build/linux/x64/release/bundle -czf dist/Komet-linux-x64.tar.gz . + + - name: Upload Linux artifact + uses: actions/upload-artifact@v4 + with: + name: komet-linux-x64 + path: dist/Komet-linux-x64.tar.gz + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 0000000..cfb2857 --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,56 @@ +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 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..68c4390 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,56 @@ +name: Build Windows + +on: + workflow_dispatch: + push: + branches: + - main + - master + paths: + - 'lib/**' + - 'windows/**' + - 'pubspec.yaml' + - '.github/workflows/build-windows.yml' + pull_request: + paths: + - 'lib/**' + - 'windows/**' + - 'pubspec.yaml' + - '.github/workflows/build-windows.yml' + +env: + FLUTTER_VERSION: '3.41.5' + +jobs: + build-windows: + runs-on: windows-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 Windows + run: flutter build windows --release + + - name: Package Windows + shell: pwsh + run: | + New-Item -ItemType Directory -Force -Path dist | Out-Null + Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath dist/Komet-windows-x64.zip + + - name: Upload Windows artifact + uses: actions/upload-artifact@v4 + with: + name: komet-windows-x64 + path: dist/Komet-windows-x64.zip + if-no-files-found: error + retention-days: 30