File tree Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,10 @@ inputs:
9
9
Name :
10
10
description : Name of the module to process.
11
11
required : false
12
- Path :
13
- description : Path to the folder where the modules are located.
14
- required : false
15
- default : ${{ github.workspace }}
16
12
ArtifactName :
17
13
description : Name of the artifact to upload.
18
14
required : false
19
- default : ' module'
15
+ default : module
20
16
Debug :
21
17
description : Enable debug output.
22
18
required : false
@@ -32,6 +28,10 @@ inputs:
32
28
description : Allow prerelease versions if available.
33
29
required : false
34
30
default : ' false'
31
+ WorkingDirectory :
32
+ description : The working directory where the script will run from.
33
+ required : false
34
+ default : ${{ github.workspace }}
35
35
36
36
runs :
37
37
using : composite
@@ -41,12 +41,12 @@ runs:
41
41
id : build
42
42
env :
43
43
PSMODULE_BUILD_PSMODULE_INPUT_Name : ${{ inputs.Name }}
44
- PSMODULE_BUILD_PSMODULE_INPUT_Path : ${{ inputs.Path }}
45
44
with :
46
45
Debug : ${{ inputs.Debug }}
47
46
Prerelease : ${{ inputs.Prerelease }}
48
47
Verbose : ${{ inputs.Verbose }}
49
48
Version : ${{ inputs.Version }}
49
+ WorkingDirectory : ${{ inputs.WorkingDirectory }}
50
50
Script : |
51
51
# Build-PSModule
52
52
${{ github.action_path }}/scripts/main.ps1
55
55
uses : actions/upload-artifact@v4
56
56
with :
57
57
name : ${{ inputs.ArtifactName }}
58
- path : ${{ inputs.Path }}/outputs/module
58
+ path : ${{ inputs.WorkingDirectory }}/outputs/module
59
59
if-no-files-found : error
60
60
retention-days : 1
Original file line number Diff line number Diff line change 42
42
Build-PSModuleBase - ModuleName $ModuleName - ModuleSourceFolder $moduleSourceFolder - ModuleOutputFolder $moduleOutputFolder
43
43
Build-PSModuleManifest - ModuleName $ModuleName - ModuleOutputFolder $moduleOutputFolder
44
44
Build-PSModuleRootModule - ModuleName $ModuleName - ModuleOutputFolder $moduleOutputFolder
45
- Update-PSModuleManifestAliasesToExport - ModuleName $ModuleName - ModuleOutputFolder $moduleOutputFolder # TODO: Use AST to find aliases to export.
45
+ Update-PSModuleManifestAliasesToExport - ModuleName $ModuleName - ModuleOutputFolder $moduleOutputFolder
46
46
47
47
LogGroup ' Build manifest file - Final Result' {
48
48
$outputManifestPath = Join-Path - Path $ModuleOutputFolder - ChildPath " $ModuleName .psd1"
Original file line number Diff line number Diff line change @@ -24,13 +24,14 @@ LogGroup 'Loading inputs' {
24
24
Write-Host " Module name: [$moduleName ]"
25
25
Set-GitHubOutput - Name ModuleName - Value $moduleName
26
26
27
- $sourceFolderPath = Join-Path - Path $env: PSMODULE_BUILD_PSMODULE_INPUT_Path - ChildPath ' src'
28
- if (-not (Test-Path - Path $sourceFolderPath )) {
29
- throw " Source folder path [$sourceFolderPath ] does not exist."
30
- }
31
-
32
- $moduleOutputFolderPath = Join-Path $env: PSMODULE_BUILD_PSMODULE_INPUT_Path - ChildPath ' outputs/module'
27
+ $sourceFolderPath = Resolve-Path - Path ' src' | Select-Object - ExpandProperty Path
28
+ $moduleOutputFolderPath = Join-Path . - ChildPath ' outputs/module'
33
29
Write-Host " Modules output path: [$moduleOutputFolderPath ]"
30
+ [pscustomobject ]@ {
31
+ moduleName = $moduleName
32
+ sourceFolderPath = $sourceFolderPath
33
+ moduleOutputFolderPath = $moduleOutputFolderPath
34
+ } | Format-List
34
35
}
35
36
36
37
LogGroup ' Build local scripts' {
You can’t perform that action at this time.
0 commit comments