mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
Set installed Julia version as output (#58)
* Set installed Julia version as output (fixes #51) * Bump version
This commit is contained in:
@@ -53,6 +53,12 @@ This action sets up a Julia environment for use in actions by downloading a spec
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
outputs:
|
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.
|
# Path to the directory containing the Julia executable.
|
||||||
# Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR
|
# Equivalent to JULIA_BINDIR: https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_BINDIR
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
outputs:
|
outputs:
|
||||||
|
julia-version:
|
||||||
|
description: 'The installed Julia version. May vary from the version input if a version range was given as input.'
|
||||||
julia-bindir:
|
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'
|
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:
|
runs:
|
||||||
|
|||||||
1
lib/setup-julia.js
generated
1
lib/setup-julia.js
generated
@@ -58,6 +58,7 @@ function run() {
|
|||||||
const availableReleases = yield installer.getJuliaVersions(versionInfo);
|
const availableReleases = yield installer.getJuliaVersions(versionInfo);
|
||||||
const version = installer.getJuliaVersion(availableReleases, versionInput);
|
const version = installer.getJuliaVersion(availableReleases, versionInput);
|
||||||
core.debug(`selected Julia version: ${arch}/${version}`);
|
core.debug(`selected Julia version: ${arch}/${version}`);
|
||||||
|
core.setOutput('julia-version', version);
|
||||||
// Search in cache
|
// Search in cache
|
||||||
let juliaPath;
|
let juliaPath;
|
||||||
juliaPath = tc.find('julia', version, arch);
|
juliaPath = tc.find('julia', version, arch);
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "1.4.1",
|
"version": "1.5.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "1.4.1",
|
"version": "1.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup Julia action",
|
"description": "setup Julia action",
|
||||||
"main": "lib/setup-julia.js",
|
"main": "lib/setup-julia.js",
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ async function run() {
|
|||||||
const availableReleases = await installer.getJuliaVersions(versionInfo)
|
const availableReleases = await installer.getJuliaVersions(versionInfo)
|
||||||
const version = installer.getJuliaVersion(availableReleases, versionInput)
|
const version = installer.getJuliaVersion(availableReleases, versionInput)
|
||||||
core.debug(`selected Julia version: ${arch}/${version}`)
|
core.debug(`selected Julia version: ${arch}/${version}`)
|
||||||
|
core.setOutput('julia-version', version)
|
||||||
|
|
||||||
// Search in cache
|
// Search in cache
|
||||||
let juliaPath: string;
|
let juliaPath: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user