generated from PSModule/Template-Action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
79 lines (75 loc) · 2.34 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-PSModuleDocumentation (by PSModule)
description: Build documentation for a PowerShell module.
author: PSModule
branding:
icon: package
color: gray-dark
inputs:
Name:
description: Name of the module to process.
required: false
Path:
description: Path to the folder where the modules are located.
required: false
default: src
ModulesOutputPath:
description: Path to the folder where the built modules are outputted.
required: false
default: outputs/modules
DocsOutputPath:
description: Path to the folder where the built docs are outputted.
required: false
default: outputs/docs
ModuleArtifactName:
description: Name of the module artifact to upload.
required: false
default: module
DocsArtifactName:
description: Name of the docs artifact to upload.
required: false
default: docs
Debug:
description: Enable debug output.
required: false
default: 'false'
Verbose:
description: Enable verbose output.
required: false
default: 'false'
Version:
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
Prerelease:
description: Allow prerelease versions if available.
required: false
default: 'false'
runs:
using: composite
steps:
- name: Download module artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.ModuleArtifactName }}
path: ${{ inputs.ModulesOutputPath }}
- name: Run Build-PSModuleDocumentation
uses: PSModule/GitHub-Script@v1
env:
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
GITHUB_ACTION_INPUT_ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
GITHUB_ACTION_INPUT_DocsOutputPath: ${{ inputs.DocsOutputPath }}
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Script: |
# Build-PSModuleDocumentation
${{ github.action_path }}\scripts\main.ps1
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.DocsArtifactName }}
path: ${{ inputs.DocsOutputPath }}
if-no-files-found: error
retention-days: 1