Skip to content

Commit

Permalink
Merge pull request #6 from Hasnep/fix/add-authorisation-header-to-bin…
Browse files Browse the repository at this point in the history
…ary-downloader
  • Loading branch information
Hasnep committed Mar 8, 2023
2 parents 3726703 + 0d02b2d commit cb9f97d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface Release {
}

const TOKEN = core.getInput("token");
const AUTH = TOKEN ? `token ${TOKEN}` : undefined;
const VERSION = core.getInput("roc-version");
const VERSION_FILE = core.getInput("roc-version-file");
const ROC_REPO_OWNER = "roc-lang";
Expand Down Expand Up @@ -122,7 +123,7 @@ const getAsset = (
const downloadRocBinary = async (asset: Asset) => {
const assetUrl = asset.browser_download_url;
core.info(`Downloading asset from '${assetUrl}'.`);
const downloadPath = await tc.downloadTool(assetUrl);
const downloadPath = await tc.downloadTool(assetUrl, undefined, AUTH);
core.info(`Extracting archive at '${downloadPath}'.`);
const extractedPath = await tc.extractTar(downloadPath);
// Get the first folder in the extracted archive
Expand Down

0 comments on commit cb9f97d

Please sign in to comment.