-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
42 lines (36 loc) · 1.1 KB
/
action.yaml
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
# Setup MoonBit Action
# @author: hustcer
# @created: 2023/11/02 20:50:20
# REF:
# - https://docs.github.com/cn/actions/creating-actions/about-custom-actions
# - https://docs.github.com/cn/actions/creating-actions/metadata-syntax-for-github-actions
# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
name: 'Setup MoonBit'
author: 'hustcer'
description: 'A github action to setup MoonBit environment'
branding:
icon: 'code'
color: 'purple'
inputs:
version:
required: false
default: 'latest'
description: 'The moonbit toolchain version to setup.'
setup-core:
required: false
default: true
description: 'Set to `true` if you want to setup moonbit core.'
runs:
using: 'composite'
steps:
- name: Setup Nu
uses: hustcer/setup-nu@v3
with:
version: 0.101.0
- name: Setup MoonBit
shell: nu {0}
run: |
use ${{ github.action_path }}/nu/moonbit.nu *
let version = '${{inputs.version}}'
let setupCore = '${{inputs.setup-core}}' | into bool
setup moonbit $version --setup-core=$setupCore