-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cc2df9
commit 2827a08
Showing
1 changed file
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |