setup-nim/action.yml
mr-boneman 1aec1fa622
All checks were successful
/ test (push) Successful in 1m1s
bump default version to 2.0.8
2024-07-20 13:39:18 +02:00

25 lines
No EOL
745 B
YAML

# SPDX-License-Identifier: MIT
name: 'setup nim'
description: 'set up nim using the official binaries'
inputs:
version:
description: 'nim version to install'
default: "2.0.8"
runs:
using: "composite"
steps:
- shell: bash
run: |
set -euxo pipefail
tempdir=$(mktemp -d)
pushd $tempdir
curl -o nim.tar.xz https://nim-lang.org/download/nim-${{ inputs.version }}-linux_x64.tar.xz
tar -xf nim.tar.xz
pushd nim-${{ inputs.version }}
./install.sh /usr/bin
popd
cp nim-${{ inputs.version }}/bin/* /usr/bin
mkdir ./lib && mv /usr/lib/nim/* ./lib && mv ./lib /usr/lib/nim/lib # fixes nim not finding the system lib
popd
rm -fr $tempdir