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')
|
: version && version.startsWith('2024')
|
||||||
? ''
|
? ''
|
||||||
: '.tar.zst';
|
: '.tar.zst';
|
||||||
const url = version
|
version = (version || (await latestMiseVersion())).replace(/^v/, '');
|
||||||
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
|
const url = `https://github.com/jdx/mise/releases/download/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`;
|
||||||
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`;
|
|
||||||
const archivePath = path.join(os.tmpdir(), `mise${ext}`);
|
const archivePath = path.join(os.tmpdir(), `mise${ext}`);
|
||||||
if (getOS() === 'windows') {
|
if (getOS() === 'windows') {
|
||||||
await exec.exec('curl', ['-fsSL', url, '--output', archivePath]);
|
await exec.exec('curl', ['-fsSL', url, '--output', archivePath]);
|
||||||
|
@ -71621,6 +71620,13 @@ async function setupMise(version) {
|
||||||
}
|
}
|
||||||
core.addPath(miseBinDir);
|
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() {
|
async function setToolVersions() {
|
||||||
const toolVersions = core.getInput('tool_versions');
|
const toolVersions = core.getInput('tool_versions');
|
||||||
if (toolVersions) {
|
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')
|
: version && version.startsWith('2024')
|
||||||
? ''
|
? ''
|
||||||
: '.tar.zst'
|
: '.tar.zst'
|
||||||
const url = version
|
version = (version || (await latestMiseVersion())).replace(/^v/, '')
|
||||||
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
|
const url = `https://github.com/jdx/mise/releases/download/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
|
||||||
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`
|
|
||||||
const archivePath = path.join(os.tmpdir(), `mise${ext}`)
|
const archivePath = path.join(os.tmpdir(), `mise${ext}`)
|
||||||
if (getOS() === 'windows') {
|
if (getOS() === 'windows') {
|
||||||
await exec.exec('curl', ['-fsSL', url, '--output', archivePath])
|
await exec.exec('curl', ['-fsSL', url, '--output', archivePath])
|
||||||
|
@ -159,6 +158,14 @@ async function setupMise(version: string): Promise<void> {
|
||||||
core.addPath(miseBinDir)
|
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> {
|
async function setToolVersions(): Promise<void> {
|
||||||
const toolVersions = core.getInput('tool_versions')
|
const toolVersions = core.getInput('tool_versions')
|
||||||
if (toolVersions) {
|
if (toolVersions) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue