From 673841eb4d569dd940e3b5b3f6ab518ca464dbb6 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 | 3 +++ 2 files changed, 3 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..9d60c34 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' && '%LocalAppData%\Microsoft\WindowsApps' || '/usr/local/bin' }} ref: description: The ref to use to run the install script. default: ${{ github.action_ref }} @@ -25,8 +26,10 @@ runs: - name: Install TGF (windows) if: runner.os == 'Windows' shell: pwsh + working-directory: ${{ inputs.tgf-path }} env: 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