From 1b2f63dd3836fc8fd55bb0de15c21ca864284c96 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Oct 2021 04:06:06 +0100 Subject: [PATCH] Provide rustc version as a workflow output --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index c76a30f..a8de18c 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,11 @@ inputs: description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification required: true +outputs: + version: + description: Version as reported by `rustc --version` + value: ${{steps.rustc-version.outputs.version}} + runs: using: composite steps: @@ -15,5 +20,8 @@ runs: shell: bash - run: rustup default ${{inputs.toolchain}} shell: bash + - id: rustc-version + run: echo "::set-output name=version::$(rustc --version)" + shell: bash - run: rustc --version shell: bash