Simplify downloading

This commit is contained in:
ok-nick 2022-08-22 14:26:06 -04:00
parent c168855a1a
commit fdb395acd4
No known key found for this signature in database
GPG key ID: A93D451DB4F2EB17

View file

@ -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: |