From 806775cbc5c701670e928c32eef6b9bb9a3f925e Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sat, 3 Aug 2024 18:49:44 +0530 Subject: [PATCH] fix: shell script incompatibility on windows --- action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3963074..42adfc1 100644 --- a/action.yml +++ b/action.yml @@ -23,8 +23,11 @@ runs: using: "composite" steps: - name: Install Rokit - run: | - curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rojo-rbx/rokit/main/scripts/install.sh | bash + run: | + case ${{ runner.os }} in + Linux|macOS) curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rojo-rbx/rokit/main/scripts/install.sh | bash -s - $(echo ${{ inputs.version }} | tr -d v) ;; + Windows) gh release download ${{ inputs.version }} --repo rojo-rbx/rokit --pattern *windows-x86_64.zip ;; + esac env: GITHUB_TOKEN: ${{ inputs.token }} shell: bash