chore: use github releases (#154)

This commit is contained in:
jdx 2024-12-23 13:59:01 -06:00 committed by GitHub
parent 26caef8487
commit 2408f570e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 7 deletions

12
dist/index.js generated vendored
View file

@ -71597,9 +71597,8 @@ async function setupMise(version) {
: version && version.startsWith('2024')
? ''
: '.tar.zst';
const url = version
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`;
version = (version || (await latestMiseVersion())).replace(/^v/, '');
const url = `https://github.com/jdx/mise/releases/download/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`;
const archivePath = path.join(os.tmpdir(), `mise${ext}`);
if (getOS() === 'windows') {
await exec.exec('curl', ['-fsSL', url, '--output', archivePath]);
@ -71621,6 +71620,13 @@ async function setupMise(version) {
}
core.addPath(miseBinDir);
}
async function latestMiseVersion() {
const rsp = await exec.getExecOutput('curl', [
'-fsSL',
'https://mise.jdx.dev/VERSION'
]);
return rsp.stdout.trim();
}
async function setToolVersions() {
const toolVersions = core.getInput('tool_versions');
if (toolVersions) {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -136,9 +136,8 @@ async function setupMise(version: string): Promise<void> {
: version && version.startsWith('2024')
? ''
: '.tar.zst'
const url = version
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`
version = (version || (await latestMiseVersion())).replace(/^v/, '')
const url = `https://github.com/jdx/mise/releases/download/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
const archivePath = path.join(os.tmpdir(), `mise${ext}`)
if (getOS() === 'windows') {
await exec.exec('curl', ['-fsSL', url, '--output', archivePath])
@ -159,6 +158,14 @@ async function setupMise(version: string): Promise<void> {
core.addPath(miseBinDir)
}
async function latestMiseVersion(): Promise<string> {
const rsp = await exec.getExecOutput('curl', [
'-fsSL',
'https://mise.jdx.dev/VERSION'
])
return rsp.stdout.trim()
}
async function setToolVersions(): Promise<void> {
const toolVersions = core.getInput('tool_versions')
if (toolVersions) {