From 55c8eb9fbecbfec1aa4f8240635a6fea5bbd2b64 Mon Sep 17 00:00:00 2001 From: ok-nick <25470747+ok-nick@users.noreply.github.com> Date: Sun, 17 Jul 2022 21:32:18 -0400 Subject: [PATCH] action --- action.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..1ea83b6 --- /dev/null +++ b/action.yml @@ -0,0 +1,39 @@ +name: 'setup-aftman' +description: 'Github action to install aftman' + +inputs: + version: + description: '`aftman` version in the form `vx.x.x`' + required: false + token: + description: 'Github token from `secrets.GITHUB_TOKEN`' + required: true + + +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 + + - name: Download aftman + if: runner.os == 'Windows' + run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *windows-x86_64.zip + + - name: Download aftman + if: runner.os == 'macOS' + run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *macos-x86_64.zip + + - name: Install aftman + run: | + unzip aftman*.zip + ./aftman self-install + echo "$HOME/.aftman/bin" >> $GITHUB_PATH + env: + GITHUB_TOKEN: ${{ inputs.token }} + +branding: + icon: link-2 + color: blue +