From f9c973e2519a8327cac1963e1ebf35fd2917d909 Mon Sep 17 00:00:00 2001 From: Rounak Datta Date: Tue, 8 Aug 2023 12:04:14 +0530 Subject: [PATCH] Fix path directory --- .github/workflows/publish_cli_artifacts.yml | 4 ++-- build.gradle.kts | 4 +++- jreleaser.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_cli_artifacts.yml b/.github/workflows/publish_cli_artifacts.yml index 0fd1473..4ea187c 100644 --- a/.github/workflows/publish_cli_artifacts.yml +++ b/.github/workflows/publish_cli_artifacts.yml @@ -29,13 +29,13 @@ jobs: - name: Rename the Linux binary appropriately if: matrix.os == 'ubuntu-latest' - working-directory: ./build/bin/native/releaseExecutable + working-directory: ./build/bin/native/debugExecutable run: | mv cli.kexe cmdk-linux-x86_64 - name: Rename the macOS binary appropriately if: matrix.os == 'macos-13' - working-directory: ./build/bin/native/releaseExecutable + working-directory: ./build/bin/native/debugExecutable run: | mv cli.kexe cmdk-osx-x86_64 diff --git a/build.gradle.kts b/build.gradle.kts index 69f5b72..a9e8f70 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,9 +10,11 @@ repositories { kotlin { val hostOs = System.getProperty("os.name") + val hostArch = System.getProperty("os.arch") val isMingwX64 = hostOs.startsWith("Windows") val nativeTarget = when { - hostOs == "Mac OS X" -> macosX64("native") + hostOs == "Mac OS X" && hostArch == "x86_64" -> macosX64("native") + hostOs == "Mac OS X" && (hostArch == "arm64" || hostArch == "aarch64") -> macosArm64("native") isMingwX64 -> mingwX64("native") hostOs == "Linux" -> linuxX64("native") else -> throw GradleException("Host OS is not supported: $hostOs") diff --git a/jreleaser.yml b/jreleaser.yml index 1198f6b..927efce 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -31,7 +31,7 @@ assemble: active: ALWAYS attachPlatform: true fileSets: - - input: 'build/bin/native/releaseExecutable' + - input: 'build/bin/native/debugExecutable' output: 'bin' includes: [ 'cmdk-${platform}' ]