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" deprecationMessage: "Input `trust-check` is no longer used in `setup-aftman`, consider removing it from your configuration" default: "true" required: false trusts: description: "List of trusted tools separated by spaces" deprecationMessage: "Input `trusts` is no longer used in `setup-aftman`, consider removing it from your configuration" 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 run: | case ${{ runner.os }} 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: Install aftman run: | unzip aftman*.zip ./aftman self-install shell: bash - name: Delete artifacts run: | rm aftman*.zip rm aftman* shell: bash - name: Set environment variable if: runner.os == 'Windows' run: echo "$HOME/.aftman/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append shell: powershell - name: Set environment variable if: runner.os != 'Windows' run: echo "$HOME/.aftman/bin" >> $GITHUB_PATH shell: bash - name: Create auth file run: | cat > $HOME/.aftman/auth.toml << EOF github = "${{ inputs.token }}" EOF shell: bash - name: Install tools run: | cd ${{ inputs.path }} aftman install --no-trust-check shell: bash branding: icon: link-2 color: blue