From fdb395acd48860e674f1f18c8cda432a230ce09b Mon Sep 17 00:00:00 2001 From: ok-nick <25470747+ok-nick@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:26:06 -0400 Subject: [PATCH] Simplify downloading --- action.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/action.yml b/action.yml index d9b531c..d8fa50f 100644 --- a/action.yml +++ b/action.yml @@ -26,25 +26,18 @@ runs: using: 'composite' steps: - name: Download aftman - if: runner.os == 'Linux' - run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *linux-x86_64.zip + run: | + case "Windows" in + 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 LPGhatguy/aftman --pattern $pattern shell: bash env: GITHUB_TOKEN: ${{ inputs.token }} - - name: Download aftman - if: runner.os == 'macOS' - run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *macos-x86_64.zip - shell: bash - env: - GITHUB_TOKEN: ${{ inputs.token }} - - - name: Download aftman - if: runner.os == 'Windows' - run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *windows-x86_64.zip - shell: bash - env: - GITHUB_TOKEN: ${{ inputs.token }} - name: Install aftman run: |