forked from jiro4989/setup-nim-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
68 lines (62 loc) · 1.97 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: 'Setup Nimble environment'
description: 'Setup a Nimble environment and add it to the PATH'
author: 'jmgomez'
inputs:
nimble-version:
description: >-
The Nimble version to download.
Examples: '0.16.3', 'latest'
default: 'latest'
required: false
nimble-install-directory:
description: >-
The Nimble installation directory.
default: '.nimble_runtime'
required: false
parent-nimble-install-directory:
description: >-
The Nimble installation parent directory.
It will be placed in the current directory if this parameter is empty.
default: ''
required: false
repo-token:
description: 'The GITHUB_TOKEN secret'
required: false
runs:
using: 'composite'
steps:
- name: Install nimble
shell: bash
run: |
"${{ github.action_path }}/install_nimble.sh" \
--nimble-version "${{ inputs.nimble-version }}" \
--parent-nimble-install-directory "${{ inputs.parent-nimble-install-directory }}" \
--nimble-install-directory "${{ inputs.nimble-install-directory }}" \
--os "${{ runner.os }}" \
--repo-token "${{ inputs.repo-token }}"
- name: Set PATH for Unix
shell: bash
run: |
parent="${{ inputs.parent-nimble-install-directory }}"
if [[ "${parent}" = "" ]]; then
parent="$PWD"
fi
echo "$parent/${{ inputs.nimble-install-directory }}/bin" >> "$GITHUB_PATH"
if: runner.os != 'Windows'
- name: Set PATH for Windows
shell: pwsh
run: |
$parent = "${{ inputs.parent-nimble-install-directory }}"
if ($parent -eq "") {
$parent = "$Pwd"
}
echo "$parent\${{ inputs.nimble-install-directory }}\bin" >> $Env:GITHUB_PATH
if: runner.os == 'Windows'
- name: Print nimble directory
shell: bash
run: |
echo "installed nimble fullpath: $(which nimble)"
- name: Print nimble version
shell: bash
run: nimble -v