@@ -22674,22 +22674,41 @@ async function getLatestVolta(authToken) {
2267422674function voltaVersionHasSetup(version) {
2267522675 return semver.gte(version, '0.7.0');
2267622676}
22677- async function buildDownloadUrl(platform, version, openSSLVersion = '') {
22677+ async function buildDownloadUrl(platform, arch, version, openSSLVersion = '') {
2267822678 let fileName;
22679- switch (platform) {
22680- case 'darwin':
22681- fileName = `volta-${version}-macos.tar.gz`;
22682- break;
22683- case 'linux': {
22684- openSSLVersion = await getOpenSSLVersion(openSSLVersion);
22685- fileName = `volta-${version}-linux-${openSSLVersion}.tar.gz`;
22686- break;
22679+ const isOpenSSLDependent = semver.lt(version, '1.1.0');
22680+ if (isOpenSSLDependent) {
22681+ switch (platform) {
22682+ case 'darwin':
22683+ fileName = `volta-${version}-macos.tar.gz`;
22684+ break;
22685+ case 'linux': {
22686+ openSSLVersion = await getOpenSSLVersion(openSSLVersion);
22687+ fileName = `volta-${version}-linux-${openSSLVersion}.tar.gz`;
22688+ break;
22689+ }
22690+ case 'win32':
22691+ fileName = `volta-${version}-windows-x86_64.msi`;
22692+ break;
22693+ default:
22694+ throw new Error(`your platform ${platform} is not yet supported`);
22695+ }
22696+ }
22697+ else {
22698+ switch (platform) {
22699+ case 'darwin':
22700+ fileName = `volta-${version}-macos${arch === 'arm64' ? '-aarch64' : ''}.tar.gz`;
22701+ break;
22702+ case 'linux': {
22703+ fileName = `volta-${version}-linux.tar.gz`;
22704+ break;
22705+ }
22706+ case 'win32':
22707+ fileName = `volta-${version}-windows-x86_64.msi`;
22708+ break;
22709+ default:
22710+ throw new Error(`your platform ${platform} is not yet supported`);
2268722711 }
22688- case 'win32':
22689- fileName = `volta-${version}-windows-x86_64.msi`;
22690- break;
22691- default:
22692- throw new Error(`your platform ${platform} is not yet supported`);
2269322712 }
2269422713 return `https://github.com/volta-cli/volta/releases/download/v${version}/${fileName}`;
2269522714}
@@ -22773,7 +22792,7 @@ async function acquireVolta(version, authToken, openSSLVersion) {
2277322792 // Download - a tool installer intimately knows how to get the tool (and construct urls)
2277422793 //
2277522794 core.info(`downloading volta@${version}`);
22776- const downloadUrl = await buildDownloadUrl(external_os_.platform(), version, openSSLVersion);
22795+ const downloadUrl = await buildDownloadUrl(external_os_.platform(), external_os_.arch(), version, openSSLVersion);
2277722796 core.debug(`downloading from \`${downloadUrl}\``);
2277822797 const downloadPath = await tool_cache.downloadTool(downloadUrl, undefined, authToken);
2277922798 const voltaHome = external_path_.join(
0 commit comments