[DESKTOP] Add Mac x64 build lane

This commit is contained in:
Kamil Gurgul
2025-01-16 07:12:10 +01:00
parent 93c9408419
commit 8f932de25d
3 changed files with 63 additions and 9 deletions
+61 -3
View File
@@ -86,7 +86,7 @@ jobs:
name: CPU-Info-macos-arm64-${{ github.event.inputs.version }}-release.jar
path: desktopApp/build/compose/jars/*.jar
build_mac_dmg:
build_mac_arm64_dmg:
needs: code_quality
runs-on: macos-latest
steps:
@@ -121,8 +121,66 @@ jobs:
- name: Create path variables
id: path_variables
run: |
name="CPU-Info-${{ github.event.inputs.version }}.dmg"
path="desktopApp/build/compose/binaries/main-release/dmg/${name}"
name="CPU-Info-arm64-${{ github.event.inputs.version }}.dmg"
path="desktopApp/build/compose/binaries/main-release/dmg/CPU-Info-${{ github.event.inputs.version }}.dmg"
echo "RELEASE_NAME=$name" >> $GITHUB_ENV
echo "RELEASE_PATH=$path" >> $GITHUB_ENV
- name: Create and notarize DMG
run: |
./gradlew desktopApp:notarizeReleaseDmg -PmacOsNotarization=true \
-Pcompose.desktop.mac.notarization.appleID=$MAC_NOTARIZATION_ID \
-Pcompose.desktop.mac.notarization.password=$MAC_NOTARIZATION_PWD \
-Pcompose.desktop.mac.notarization.teamID=$MAC_APPSTORE_TEAM_ID
env:
MAC_NOTARIZATION_ID: ${{ secrets.MAC_NOTARIZATION_ID }}
MAC_NOTARIZATION_PWD: ${{ secrets.MAC_NOTARIZATION_PWD }}
MAC_APPSTORE_TEAM_ID: ${{ secrets.MAC_APPSTORE_TEAM_ID }}
RELEASE_PATH: ${{ env.RELEASE_PATH }}
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: ${{ env.RELEASE_NAME }}
path: ${{ env.RELEASE_PATH }}
build_mac_x64_dmg:
needs: code_quality
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: set up JDK 18
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Cache KMP tooling
uses: actions/cache@v4
with:
path: |
~/.konan
key: ${{ runner.os }}-v1-${{ hashFiles('*.versions.toml') }}
- name: Import certs
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MAC_NOTARIZATION_CERT }}
p12-password: ${{ secrets.MAC_NOTARIZATION_CERT_PASS }}
- name: Create path variables
id: path_variables
run: |
name="CPU-Info-x64-${{ github.event.inputs.version }}.dmg"
path="desktopApp/build/compose/binaries/main-release/dmg/CPU-Info-${{ github.event.inputs.version }}.dmg"
echo "RELEASE_NAME=$name" >> $GITHUB_ENV
echo "RELEASE_PATH=$path" >> $GITHUB_ENV
+1 -1
View File
@@ -23,7 +23,7 @@ compose.desktop {
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Pkg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "CPU-Info"
packageVersion = "1.4.1"
packageVersion = "1.4.2"
val iconsRoot = project.file("desktop-icons")
macOS {
+1 -5
View File
@@ -133,11 +133,7 @@ kotlin {
val desktopMain by getting {
dependencies {
implementation(compose.desktop.windows_x64)
implementation(compose.desktop.macos_arm64)
implementation(compose.desktop.macos_x64)
implementation(compose.desktop.linux_x64)
implementation(compose.desktop.linux_arm64)
implementation(compose.desktop.currentOs)
implementation(libs.androidx.datastore.preferences)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.oshi)