From 04f48ec04fc79a2f0dccf88d6988ae15b5bbc581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Pich=C3=A9?= Date: Mon, 15 Jul 2024 05:29:01 -0400 Subject: [PATCH] install in path on windows --- .github/workflows/test-install.yml | 4 ---- action.yml | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 570e65c..ed817ac 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -42,7 +42,3 @@ jobs: ref: ${{ github.head_ref }} - run: tgf --help-tgf - if: runner.os != 'Windows' - - - run: ./tgf --help-tgf - if: runner.os == 'Windows' diff --git a/action.yml b/action.yml index 02402a6..b34e590 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,7 @@ inputs: tgf-path: description: Installs the TGF binary to this folder. The folder will not be added to the PATH. required: false + default: ${{ runner.os == 'Windows' && '${env:LOCALAPPDATA}\Microsoft\WindowsApps' || '/usr/local/bin' }} ref: description: The ref to use to run the install script. default: ${{ github.action_ref }} @@ -29,4 +30,5 @@ runs: TGF_PATH: ${{ inputs.tgf-path }} VERSION: ${{ inputs.ref }} run: | + echo ${env:TGF_PATH} (Invoke-WebRequest https://raw.githubusercontent.com/coveooss/tgf/${env:VERSION}/get-latest-tgf.ps1).Content | Invoke-Expression