-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (50 loc) · 1.8 KB
/
Copy pathaction.yml
File metadata and controls
54 lines (50 loc) · 1.8 KB
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
name: Build-PSModule
description: Build a PowerShell module to the PowerShell Gallery.
author: PSModule
inputs:
Name:
description: Name of the module to process.
required: false
Version:
description: |
The Major.Minor.Patch version to stamp into the built module manifest. When empty, the placeholder '999.0.0'
is used so local builds still produce a valid manifest.
required: false
default: ''
Prerelease:
description: |
Optional prerelease tag (for example 'feature001'). When set, the value is written to PrivateData.PSData.Prerelease
so the built artifact is a complete prerelease package without any post-build mutation.
required: false
default: ''
ArtifactName:
description: Name of the artifact to upload.
required: false
default: module
WorkingDirectory:
description: The working directory where the script will run from.
required: false
default: '.'
runs:
using: composite
steps:
- name: Install-PSModuleHelpers
uses: PSModule/Install-PSModuleHelpers@ed79b6e3aa8c9cd3d30ab2bf02ea6bd4687b9c74 # v1.0.7
- name: Run Build-PSModule
shell: pwsh
id: build
working-directory: ${{ inputs.WorkingDirectory }}
env:
PSMODULE_BUILD_PSMODULE_INPUT_Name: ${{ inputs.Name }}
PSMODULE_BUILD_PSMODULE_INPUT_Version: ${{ inputs.Version }}
PSMODULE_BUILD_PSMODULE_INPUT_Prerelease: ${{ inputs.Prerelease }}
run: |
# Build-PSModule
${{ github.action_path }}/src/main.ps1
- name: Upload module artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.ArtifactName }}
path: ${{ steps.build.outputs.ModuleOutputFolderPath }}
if-no-files-found: error
retention-days: 1