-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
79 lines (64 loc) · 2.68 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
69
70
71
72
73
74
75
76
77
78
79
name: Build NorthwoodPluginAPI based plugin
description: Builds, runs tests and uploads artifacts for NwPluginAPI based plugin.
author: Adam Szerszenowicz (https://github.com/Pogromca-SCP)
branding:
icon: aperture
color: gray-dark
inputs:
plugin-name:
description: Name of main plugin assembly/project to package.
required: true
refs-variable:
desctiption: Name of game files references environment variable used in the project. Triggers game files download when set.
default: $null
required: false
depot-downloader-version:
description: Depot downloader version to use for game files download. Takes effect only when `refs-variable` is set.
default: 2.7.4
required: false
run-tests:
description: Whether or not the tests should be run for the project.
default: true
required: false
initial-test-runs:
description: Amount of initial test runs. Takes effect only when `refs-variable` is set and `run-tests` is set to `true`.
default: 3
required: false
dependencies:
description: List of assembly/project names to add into `dependencies.zip` file.
default: '@()'
required: false
bin-path:
description: Binary files path pattern to use, `$` is replaced with assembly/project name.
default: /$/bin/Release/net48/$
required: false
includes:
description: Other non-project assemblies/files to add into `dependencies.zip` file (full paths).
default: '@()'
required: false
configuration:
description: Project build configuration. Consider changing `bin-path` input value alongside this.
default: Release
required: false
runs:
using: composite
steps:
- name: Build project
shell: pwsh
run: ${{ github.action_path }}/build_project.ps1 -referencesVariable ${{ inputs.refs-variable }} -depotDownloaderVersion ${{ inputs.depot-downloader-version }} -config ${{ inputs.configuration }}
- name: Run initial tests
if: ${{ inputs.run-tests }}
shell: pwsh
run: ${{ github.action_path }}/init_tests.ps1 -referencesVariable ${{ inputs.refs-variable }} -initialRuns ${{ inputs.initial-test-runs }}
- name: Run tests
if: ${{ inputs.run-tests }}
shell: pwsh
run: dotnet test --no-build --verbosity normal
- name: Prepare artifacts
shell: pwsh
run: ${{ github.action_path }}/prepare_artifacts.ps1 -pluginName ${{ inputs.plugin-name }} -workspacePath ${{ github.workspace }} -binPathPattern ${{ inputs.bin-path }} -dependencies ${{ inputs.dependencies }} -includes ${{ inputs.includes }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.plugin-name }}
path: D:/a/plugin/Artifacts