-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
57 lines (56 loc) · 1.58 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
name: 'Runs gdlint on GDScript Code'
description: 'Runs gdlint on GDScript Code in directory in the repository.'
inputs:
python:
description: |
Install Python
Default is true.
default: true
python_version:
description: |
Install a specific python version
Default is 3.10.
default: '3.10'
gdtoolkit_version:
description: |
Install a specific gdtoolkit version
Default is latest.
default: 'latest'
directory:
description: |
Define on which directory gdlint should be run.
Please provide a directory name without trailing /.
Default is all files in the root of the repository.
default: false
runs:
using: "composite"
steps:
- if: ${{ inputs.python == 'true' && inputs.python_version != '3.10' }}
name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ inputs.python_version }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- if: ${{ inputs.gdtoolkit_version == 'latest' }}
name: Install gdtoolkit
shell: bash
run: |
pip install gdtoolkit
- if: ${{ inputs.gdtoolkit_version != 'latest' }}
name: Install gdtoolkit
shell: bash
run: |
pip install gdtoolkit==${{ inputs.gdtoolkit_version }}
- if: ${{ inputs.directory == 'false' }}
name: Run gdlint
shell: bash
run: |
gdlint *.gd
- if: ${{ inputs.directory != 'false' }}
name: Run gdlint
shell: bash
run: |
gdlint ${{ inputs.directory }}/*.gd