mirror of
https://github.com/CompeyDev/setup-rokit.git
synced 2024-12-12 04:30:37 +00:00
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: setup-aftman
|
|
description: Github action to install and run aftman; a toolchain manager.
|
|
author: ok-nick
|
|
|
|
inputs:
|
|
version:
|
|
description: '`aftman` version in the form `vx.x.x`'
|
|
required: false
|
|
trust-check:
|
|
description: "Whether to check trusts"
|
|
default: 'true'
|
|
required: false
|
|
trusts:
|
|
description: 'List of trusted tools separated by spaces'
|
|
required: false
|
|
path:
|
|
description: 'Path to the `aftman.toml` directory'
|
|
default: '.'
|
|
required: false
|
|
token:
|
|
description: 'Github token from `github.token`'
|
|
default: '${{ github.token }}'
|
|
required: false
|
|
|
|
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
|
|
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: |
|
|
unzip aftman*.zip
|
|
./aftman self-install
|
|
echo "$HOME/.aftman/bin" >> $GITHUB_PATH
|
|
shell: bash
|
|
|
|
- name: Setup trusts
|
|
if: inputs.trust-check == 'true'
|
|
run: |
|
|
for name in ${{ inputs.trusts }}; do
|
|
aftman trust $name
|
|
done
|
|
shell: bash
|
|
|
|
- name: Install tools
|
|
run: |
|
|
cd ${{ inputs.path }}
|
|
if [ ${{ inputs.trust-check }} == false ]; then
|
|
aftman install --no-trust-check
|
|
else
|
|
aftman install
|
|
fi
|
|
shell: bash
|
|
|
|
branding:
|
|
icon: link-2
|
|
color: blue
|