Use github token by default to authenticate download (#11)

This commit is contained in:
Simon Sorensen
2023-02-11 15:57:03 +02:00
committed by GitHub
parent 95b912dc5d
commit ad659545e1
6 changed files with 39 additions and 20 deletions
+11 -5
View File
@@ -3,12 +3,18 @@ import * as setup from "@extractions/setup-crate";
async function main() {
try {
const githubToken =
process.env.GITHUB_TOKEN || core.getInput("github-token");
const versionSpec = core.getInput("just-version");
const tool = await setup.checkOrInstallTool({
owner: "casey",
name: "just",
versionSpec,
});
const tool = await setup.checkOrInstallTool(
{
owner: "casey",
name: "just",
versionSpec,
},
{ auth: githubToken }
);
core.addPath(tool.dir);
core.info(`Successfully setup ${tool.name} v${tool.version}`);
} catch (err) {