Compare commits

...

6 Commits

Author SHA1 Message Date
David Tolnay d388a4836f
toolchain: stable 2024-05-01 09:12:27 -07:00
David Tolnay d8352f6b1d
Move CARGO_HOME step in front of rustup install 2024-05-01 09:11:35 -07:00
David Tolnay 22eb75fbe0
Add description for CARGO_HOME step 2024-05-01 09:09:04 -07:00
David Tolnay e4e1c59547
Combine CARGO_HOME choice into a single step 2024-05-01 09:06:11 -07:00
David Tolnay b004a9e513
Merge pull request #108 from dariocurr/master
Add `CARGO_HOME` to `GITHUB_ENV`
2024-05-01 12:04:19 -04:00
Dario Curreri 18c33afdda
Add `CARGO_HOME` to `GITHUB_ENV` 2024-04-30 10:58:18 +02:00
1 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,8 @@ branding:
inputs:
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: true
required: false
default: stable
targets:
description: Comma-separated list of target triples to install for this toolchain
required: false
@ -59,11 +60,16 @@ runs:
components: ${{inputs.components}}
shell: bash
- run: |
: set $CARGO_HOME
echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV
shell: bash
- run: |
: install rustup if needed
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
fi
if: runner.os != 'Windows'
shell: bash