Skip to content

Commit

Permalink
first version
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBernard03 committed Sep 21, 2024
1 parent 8cc2df9 commit 2827a08
Showing 1 changed file with 38 additions and 34 deletions.
72 changes: 38 additions & 34 deletions .github/workflows/main.yml
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/

0 comments on commit 2827a08

Please sign in to comment.