Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Add deployment for macos #13

Merged
merged 9 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 19 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build macOS App
name: Build

on:
push:
Expand All @@ -7,37 +7,22 @@ on:

jobs:
build:
runs-on: macos-14
runs-on: macos-13
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: Build the app
run: ./gradlew packageDmg

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: macos-build
path: /Users/runner/work/AndroidTools/AndroidTools/composeApp/build/compose/binaries/main/dmg
2 changes: 1 addition & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ kotlin {

implementation(libs.kotlinx.datetime)

implementation("io.klogging:klogging-jvm:0.7.2")
implementation(libs.klogging)
}
// https://gist.github.com/OysterD3?page=3
// https://betterprogramming.pub/how-to-create-an-auto-updater-for-desktop-application-jetpack-compose-d118db26d65f
Expand Down
6 changes: 6 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ koin = "3.4.3"

datetime = "0.6.1"

klogging = "0.7.2"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
Expand All @@ -29,6 +31,10 @@ koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "datetime" }


klogging = { module = "io.klogging:klogging-jvm", version.ref = "klogging" }



[plugins]
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Expand Down
Loading