setup-rokit/action.yml

58 lines
1.5 KiB
YAML
Raw Normal View History

2022-07-18 04:41:58 +01:00
name: setup-aftman
2022-07-18 18:32:35 +01:00
description: Github action to install and run aftman; a toolchain manager.
2022-07-18 04:41:58 +01:00
author: ok-nick
2022-07-18 02:32:18 +01:00
inputs:
version:
description: '`aftman` version in the form `vx.x.x`'
required: false
trust-check:
deprecationMessage: 'Input `trust-check` is no longer used in `setup-aftman`, consider removing it from your configuration'
default: 'true'
required: false
trusts:
deprecationMessage: 'Input `trusts` is no longer used in `setup-aftman`, consider removing it from your configuration'
required: false
2022-07-18 03:56:05 +01:00
path:
description: 'Path to the `aftman.toml` directory'
2022-07-18 17:07:51 +01:00
default: '.'
2022-07-18 03:56:05 +01:00
required: false
2022-07-18 02:32:18 +01:00
token:
2022-07-18 16:49:36 +01:00
description: 'Github token from `github.token`'
2022-07-18 16:50:58 +01:00
default: '${{ github.token }}'
2022-07-18 17:07:51 +01:00
required: false
2022-07-18 02:32:18 +01:00
runs:
using: 'composite'
steps:
- name: Download aftman
2022-08-22 19:26:06 +01:00
run: |
case "Windows" in
Linux) pattern="*linux-x86_64.zip" ;;
macOS) pattern="*macos-x86_64.zip" ;;
Windows) pattern="*windows-x86_64.zip" ;;
esac
2022-07-18 02:32:18 +01:00
2022-08-22 19:26:06 +01:00
gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern $pattern
2022-07-18 17:20:56 +01:00
shell: bash
2022-07-18 04:55:01 +01:00
env:
GITHUB_TOKEN: ${{ inputs.token }}
2022-07-18 02:32:18 +01:00
2022-07-18 04:41:58 +01:00
2022-07-18 02:32:18 +01:00
- name: Install aftman
run: |
unzip aftman*.zip
./aftman self-install
echo "$HOME/.aftman/bin" >> $GITHUB_PATH
2022-07-18 17:20:56 +01:00
shell: bash
2022-07-18 02:32:18 +01:00
2022-07-18 03:56:05 +01:00
- name: Install tools
run: |
cd ${{ inputs.path }}
2022-08-17 02:18:04 +01:00
aftman install --no-trust-check
2022-07-18 17:20:56 +01:00
shell: bash
2022-07-18 03:56:05 +01:00
2022-07-18 02:32:18 +01:00
branding:
icon: link-2
color: blue