Skip to content

Commit

Permalink
chore: use github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 26caef8 commit 78aece9
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 9 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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())
const url = `https://github.com/jdx/mise/releases/download/${version}/mise-${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
}

async function setToolVersions(): Promise<void> {
const toolVersions = core.getInput('tool_versions')
if (toolVersions) {

0 comments on commit 78aece9

Please sign in to comment.