feat: support linux arm64 public preview (#1144)
This commit is contained in:
committed by
GitHub
parent
a0297a1378
commit
ec5d18412c
@ -1,6 +1,7 @@
|
||||
import * as core from "@actions/core"
|
||||
import * as httpm from "@actions/http-client"
|
||||
import * as fs from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
|
||||
import { InstallMode } from "./install"
|
||||
@ -139,10 +140,14 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>
|
||||
// if the patched version is passed, just use it
|
||||
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
|
||||
return new Promise((resolve) => {
|
||||
let arch: string = "amd64"
|
||||
if (os.arch() === "arm64") {
|
||||
arch = "arm64"
|
||||
}
|
||||
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`
|
||||
resolve({
|
||||
TargetVersion: `v${versionWithoutV}`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-${arch}.tar.gz`,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user