mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-22 07:31:46 +00:00
Use core.addPath to add binpath to job's PATH
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
8f54926f6c
commit
f8b937725a
1 changed files with 3 additions and 7 deletions
10
index.js
10
index.js
|
|
@ -17,11 +17,6 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
||||||
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
||||||
const archive = `${tempdir}gotestfmt${postfix}`;
|
const archive = `${tempdir}gotestfmt${postfix}`;
|
||||||
|
|
||||||
// Make sure that the install directory is on the PATH
|
|
||||||
if (os === "windows") {
|
|
||||||
execSync(`echo "${binpath}" >> $env:GITHUB_PATH`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search through the latest release assets for an install canidate
|
// Search through the latest release assets for an install canidate
|
||||||
for (let asset of releaseAssets.data) {
|
for (let asset of releaseAssets.data) {
|
||||||
// Check if the asset name matches the determined postfix
|
// Check if the asset name matches the determined postfix
|
||||||
|
|
@ -38,8 +33,9 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the that the install target exists
|
// Ensure the that the install target exists
|
||||||
console.log("Preparing install target...")
|
console.log("Preparing install target...");
|
||||||
fs.mkdirSync(binpath, { recursive: true })
|
fs.mkdirSync(binpath, { recursive: true });
|
||||||
|
core.addPath(binpath);
|
||||||
|
|
||||||
// Extract the archive into the install target
|
// Extract the archive into the install target
|
||||||
console.log("Unpacking archive file...")
|
console.log("Unpacking archive file...")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue