Skip to content

Commit 87205b8

Browse files
🩹 [Refactor]: Update module output path resolution in action.yml and main.ps1 for improved artifact handling
1 parent cb7d001 commit 87205b8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ runs:
5858
uses: actions/upload-artifact@v4
5959
with:
6060
name: ${{ inputs.ArtifactName }}
61-
path: ${{ inputs.WorkingDirectory }}/outputs/module
61+
path: ${{ fromJson(steps.build.outputs.result).moduleOutputFolderPath }}
6262
if-no-files-found: error
6363
retention-days: 1

‎scripts/main.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LogGroup 'Loading inputs' {
2424
Set-GitHubOutput -Name ModuleName -Value $moduleName
2525

2626
$sourceFolderPath = Resolve-Path -Path 'src' | Select-Object -ExpandProperty Path
27-
$moduleOutputFolderPath = Join-Path . -ChildPath 'outputs/module'
27+
$moduleOutputFolderPath = Join-Path $pwd -ChildPath 'outputs/module'
2828
[pscustomobject]@{
2929
moduleName = $moduleName
3030
sourceFolderPath = $sourceFolderPath
@@ -52,4 +52,6 @@ $params = @{
5252
}
5353
Build-PSModule @params
5454

55+
Set-GithubOutput -Name ModuleOutputFolderPath -Value $moduleOutputFolderPath
56+
5557
exit 0

0 commit comments

Comments
 (0)