Add token input and pass it to release assets download.

This commit is contained in:
Tingluo Huang
2026-01-07 22:23:14 +01:00
committed by Benoit Daloze
parent be19563477
commit 7f50f6e3b3
7 changed files with 52 additions and 12 deletions
+2 -1
View File
@@ -74,8 +74,9 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
const downloadPath = await common.measure('Downloading Ruby', async () => {
const url = getDownloadURL(platform, engine, version)
console.log(url)
const auth = common.inputs.token ? `token ${common.inputs.token}` : undefined
try {
return await tc.downloadTool(url)
return await tc.downloadTool(url, undefined, auth)
} catch (error) {
if (error.message.includes('404')) {
throw new Error(`Unavailable version ${version} for ${engine} on ${platform}