fix: add cpu architecture suffix to artifact name

This commit is contained in:
Fumihiko Hata 2024-01-08 18:44:22 +09:00
parent 44fb9b5654
commit b30ef4f1ad
2 changed files with 6 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "setup-clojure",
"version": "12.1",
"version": "12.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "setup-clojure",
"version": "12.1",
"version": "12.2",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.2.2",

View File

@ -25,12 +25,14 @@ export async function getLatestCljstyle(githubAuth?: string): Promise<string> {
}
export function getArtifactName(version: string): string {
const [major, minor] = version.split('.').map(n => parseInt(n))
const archiSuffix = major > 0 || minor > 15 ? '_amd64' : ''
const platform = os.platform()
switch (platform) {
case 'darwin':
return `cljstyle_${version}_macos.zip`
return `cljstyle_${version}_macos${archiSuffix}.zip`
default:
return `cljstyle_${version}_linux.zip`
return `cljstyle_${version}_linux${archiSuffix}.zip`
}
}