From 24d5dc5cdcb9d6eeb1c18816847a0af5fa96bd97 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sun, 4 Aug 2024 16:23:56 +0530 Subject: [PATCH] fix: temporarily use gh CLI to download rokit --- action.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index bd26202..bd31083 100644 --- a/action.yml +++ b/action.yml @@ -22,16 +22,35 @@ inputs: runs: using: "composite" steps: - - name: Install Rokit + - name: Download Rokit 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 && unzip rokit-*.zip && ./rokit.exe self-install ;; + Linux) pattern="*linux-x86_64.zip" ;; + macOS) pattern="*macos-x86_64.zip" ;; + Windows) pattern="*windows-x86_64.zip" ;; esac + + gh release download ${{ inputs.version }} --repo rojo-rbx/rokit --pattern $pattern env: GITHUB_TOKEN: ${{ inputs.token }} shell: bash + - name: Install Rokit + run: | + unzip rokit*.zip + ./rokit self-install + shell: bash + + - name: Delete artifacts + run: | + rm rokit*.zip + if ${{ runner.os == 'Windows' }}; then + rm rokit.exe + else + rm rokit + fi + shell: bash + - name: Add Rokit to PATH run: echo "$HOME/.rokit/bin" >> $GITHUB_PATH shell: bash