chore: use github releases (#154)
This commit is contained in:
parent
26caef8487
commit
2408f570e1
3 changed files with 20 additions and 7 deletions
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
|
@ -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
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
13
src/index.ts
13
src/index.ts
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue