From 2827a08cf46a4c3e3ec3eee060630f152eba91d0 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 21 Sep 2024 15:23:32 +0200 Subject: [PATCH] first version --- .github/workflows/main.yml | 72 ++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 268f715..4a78d46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,43 +1,47 @@ -name: Build macOS App +name: Build on: push: branches: - main + - ci-cd + pull_request: + branches: + - main jobs: build: - runs-on: macos-14 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '15.1' - - - name: Build the project - run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - - - name: Archive the project - run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx -configuration Release archive -archivePath ${{github.workspace}}/build/AndroidTools.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - - - name: Export the archive - run: | - xcodebuild -exportArchive \ - -archivePath ${{github.workspace}}/build/AndroidTools.xcarchive \ - -exportPath ${{github.workspace}}/build \ - -exportOptionsPlist AndroidTools/ExportOptions.plist \ - CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO - - - name: List files - run: ls -l ${{github.workspace}}/build/ - - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: AndroidTools - path: | - ${{github.workspace}}/build/*.pkg - ${{github.workspace}}/build/*.app + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + + - name: Set up Gradle (Windows uniquement) + if: matrix.os == 'windows-latest' + uses: gradle/gradle-build-action@v2 + + - name: Build the app + run: ./gradlew packageReleaseDistZip + + - name: Upload build artifacts (macOS) + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v3 + with: + name: macos-build + path: build/compose/binaries/main/release/ + + - name: Upload build artifacts (Windows) + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 + with: + name: windows-build + path: build/compose/binaries/main/release/