chore: base

This commit is contained in:
xHyroM 2022-07-11 09:45:23 +02:00
parent b04d87b14c
commit e187173d21
425 changed files with 1080881 additions and 5 deletions

16
dist/utils/getGithubRelease.js vendored Normal file
View file

@ -0,0 +1,16 @@
import { fetch } from 'undici';
export default async (version, token) => {
let url;
if (version === 'latest')
url = 'https://api.github.com/repos/oven-sh/bun/releases/latest';
else
url = `https://api.github.com/repos/oven-sh/bun/releases/tags/bun-v${version}`;
const release = await (await fetch(url, {
headers: {
'Content-Type': 'application/json',
'User-Agent': 'setup-bun-github-action',
'Authorization': token
}
})).json();
return release;
};