mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-19 04:58:25 +02:00
fix: warn if bad version
This commit is contained in:
parent
5a78c10e01
commit
4e76ddea17
5 changed files with 28 additions and 20 deletions
6
dist/utils/getGithubRelease.js
vendored
6
dist/utils/getGithubRelease.js
vendored
|
@ -1,10 +1,8 @@
|
|||
import { getInput } from '@actions/core';
|
||||
import fetch from 'node-fetch';
|
||||
export default async (version, token) => {
|
||||
const miscTestBuilds = (getInput('misc-test-builds') === 'true');
|
||||
export default async (version, token, miscTestBuilds) => {
|
||||
const repository = miscTestBuilds ? 'oven-sh/misc-test-builds' : 'oven-sh/bun';
|
||||
let url;
|
||||
if (version === 'latest')
|
||||
if (version === 'latest' || miscTestBuilds)
|
||||
url = `https://api.github.com/repos/${repository}/releases/latest`;
|
||||
else
|
||||
url = `https://api.github.com/repos/${repository}/releases/tags/bun-v${version}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue