From ad55de5e88c0a8f73299564892de5f6d0c1dbc44 Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Fri, 26 Aug 2022 14:42:58 -0600 Subject: [PATCH] Install arm64 babashka in arm64 runners --- src/babashka.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/babashka.ts b/src/babashka.ts index f001f29..bbf7897 100644 --- a/src/babashka.ts +++ b/src/babashka.ts @@ -27,13 +27,21 @@ export async function getLatestBabashka(githubAuth?: string): Promise { export function getArtifactName(version: string): string { const platform = os.platform() + let arch + switch (os.arch()) { + case 'x64': + arch = 'amd64' + case 'arm64': + arch = 'aarch64' + } + switch (platform) { case 'win32': - return `babashka-${version}-windows-amd64.zip` + return `babashka-${version}-windows-${arch}.zip` case 'darwin': - return `babashka-${version}-macos-amd64.tar.gz` + return `babashka-${version}-macos-${arch}.tar.gz` default: - return `babashka-${version}-linux-amd64-static.tar.gz` + return `babashka-${version}-linux-${arch}-static.tar.gz` } }