feat: custom download url, custom repository

This commit is contained in:
xHyroM 2022-07-28 07:50:56 +02:00
parent 27a94d6f80
commit e6a8865f72
9 changed files with 135 additions and 21 deletions

6
dist/index.js vendored
View file

@ -14,10 +14,12 @@ const main = async () => {
try {
const version = getInput('bun-version');
const token = getInput('github-token');
const miscTestBuilds = (getInput('misc-test-builds') === 'true');
const repository = getInput('repository');
const miscTestBuilds = (getInput('misc-test-builds') === 'true') || (repository.includes('oven-sh/misc-test-builds'));
const customDownloadUrl = getInput('custom-download-url') || null;
if (!version)
return exit('Invalid bun version.');
const release = await getGithubRelease(version, token, miscTestBuilds);
const release = await getGithubRelease(version, token, repository, customDownloadUrl, miscTestBuilds);
if ((release === null || release === void 0 ? void 0 : release.message) === 'Not Found')
return exit('Invalid bun version.', miscTestBuilds);
info(`Going to install release ${release.version}`);