From 2feb9a10bf115eec0f0dc8b1aa8680f766164d6c Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Sat, 26 Dec 2020 15:35:42 +0100 Subject: [PATCH] Set installed Julia version as output (#58) * Set installed Julia version as output (fixes #51) * Bump version --- README.md | 6 ++++++ action.yml | 2 ++ lib/setup-julia.js | 1 + package-lock.json | 2 +- package.json | 2 +- src/setup-julia.ts | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 062bce3..fee626f 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ This action sets up a Julia environment for use in actions by downloading a spec ```yaml outputs: + # The installed Julia version. + # May vary from the version input if a version range was given as input. + # + # Example output: '1.5.3' + + julia-version: '' # Path to the directory containing the Julia executable. # Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR # diff --git a/action.yml b/action.yml index e4692d1..723a23f 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,8 @@ inputs: required: false default: 'false' outputs: + julia-version: + description: 'The installed Julia version. May vary from the version input if a version range was given as input.' julia-bindir: description: 'Path to the directory containing the Julia executable. Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR' runs: diff --git a/lib/setup-julia.js b/lib/setup-julia.js index e91848d..5fcbea8 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -58,6 +58,7 @@ function run() { const availableReleases = yield installer.getJuliaVersions(versionInfo); const version = installer.getJuliaVersion(availableReleases, versionInput); core.debug(`selected Julia version: ${arch}/${version}`); + core.setOutput('julia-version', version); // Search in cache let juliaPath; juliaPath = tc.find('julia', version, arch); diff --git a/package-lock.json b/package-lock.json index 61d567d..262e829 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "setup-julia", - "version": "1.4.1", + "version": "1.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1d5973a..0896b9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-julia", - "version": "1.4.1", + "version": "1.5.0", "private": true, "description": "setup Julia action", "main": "lib/setup-julia.js", diff --git a/src/setup-julia.ts b/src/setup-julia.ts index f99a90b..2c334bf 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -48,6 +48,7 @@ async function run() { const availableReleases = await installer.getJuliaVersions(versionInfo) const version = installer.getJuliaVersion(availableReleases, versionInput) core.debug(`selected Julia version: ${arch}/${version}`) + core.setOutput('julia-version', version) // Search in cache let juliaPath: string;