mirror of
https://github.com/actions-rust-lang/setup-rust-toolchain.git
synced 2025-12-27 01:54:20 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1780873c7b | ||
|
|
063a3b947b | ||
|
|
f89a806691 | ||
|
|
51897173ae | ||
|
|
d6688fbd7a | ||
|
|
02be93da58 | ||
|
|
69e4802460 | ||
|
|
183cfebcbd |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.15.2] - 2025-10-04
|
||||
|
||||
* Fix: Run the version detection steps in the selected `rust-src-dir` directory.
|
||||
This should enable the version selection even without a default toolchain installed.
|
||||
Fixes #74.
|
||||
|
||||
## [1.15.1] - 2025-09-23
|
||||
|
||||
* Update `Swatinem/rust-cache` to v2.8.1
|
||||
|
||||
## [1.15.0] - 2025-09-14
|
||||
|
||||
* Add support for non-root source directory.
|
||||
|
||||
18
action.yml
18
action.yml
@@ -169,8 +169,18 @@ runs:
|
||||
rust_src_dir: ${{inputs.rust-src-dir}}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -d "$rust_src_dir" ]]; then
|
||||
cd "$rust_src_dir"
|
||||
# Check if value is set
|
||||
if [[ -n "$rust_src_dir" ]]
|
||||
then
|
||||
# If value is set the directory must exist
|
||||
if [[ -d "$rust_src_dir" ]]
|
||||
then
|
||||
cd "$rust_src_dir"
|
||||
else
|
||||
echo "'rust-src-dir' does not point to an existing directory" >&2
|
||||
echo "The value of 'rust-src-dir' is: ${rust_src_dir}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ -z "$toolchain" && ( -f "rust-toolchain" || -f "rust-toolchain.toml") ]]
|
||||
then
|
||||
@@ -201,6 +211,8 @@ runs:
|
||||
- id: versions
|
||||
name: Print installed versions
|
||||
shell: bash
|
||||
# Switch to the Rust sub-directory
|
||||
working-directory: ${{inputs.rust-src-dir || '.'}}
|
||||
run: |
|
||||
echo "rustc-version=$(rustc --version)" >> $GITHUB_OUTPUT
|
||||
rustc --version --verbose
|
||||
@@ -227,7 +239,7 @@ runs:
|
||||
|
||||
- name: Setup Rust Caching
|
||||
if: inputs.cache == 'true'
|
||||
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
|
||||
with:
|
||||
workspaces: ${{ inputs.cache-workspaces || inputs.rust-src-dir }}
|
||||
cache-directories: ${{inputs.cache-directories}}
|
||||
|
||||
Reference in New Issue
Block a user