diff --git a/action.yml b/action.yml index 97b1171..df3862d 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'Setup Rust' +name: 'Setup rustup toolchain' author: 'Miles Johnson' description: 'Sets up Rust and Cargo.' inputs: diff --git a/index.ts b/index.ts index 651b7f5..7cc9022 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,5 @@ import fs from 'fs'; +import os from 'os'; import path from 'path'; import * as core from '@actions/core'; import * as exec from '@actions/exec'; @@ -135,6 +136,10 @@ async function run() { // Always enable colored output core.exportVariable('CARGO_TERM_COLOR', 'always'); + + core.info('Adding ~/.cargo/bin to PATH'); + + core.addPath(path.join(os.homedir(), '.cargo', 'bin')); } void run();