9292 GITHUB_TOKEN : ${{ github.token }}
9393 with :
9494 Name : PSModuleTest
95- ModulePath : outputs/module
95+ ModulePath : outputs/module-prerelease
9696 WorkingDirectory : tests
9797 APIKey : ${{ secrets.APIKEY }} # zizmor: ignore[secrets-outside-env] saved in org secrets as an intentional choice
9898 WhatIf : true
@@ -153,13 +153,15 @@ jobs:
153153 GITHUB_TOKEN : ${{ github.token }}
154154 with :
155155 Name : PSModuleTest
156- ModulePath : outputs/module
156+ ModulePath : outputs/module-unstamped
157157 WorkingDirectory : tests
158158 APIKey : ${{ secrets.APIKEY }} # zizmor: ignore[secrets-outside-env] saved in org secrets as an intentional choice
159159 WhatIf : true
160160
161161 - name : Validate unstamped artifact is rejected
162162 shell : pwsh
163+ env :
164+ PUBLISH_OUTCOME : ${{ steps.publish.outcome }}
163165 run : |
164166 $manifestPath = 'tests/outputs/module-unstamped/PSModuleTest/PSModuleTest.psd1'
165167 $manifest = Import-PowerShellDataFile -Path $manifestPath
@@ -168,13 +170,13 @@ jobs:
168170
169171 Write-Host "Module version in manifest: [$version]"
170172 Write-Host "Release tag from action: [$releaseTag]"
171- Write-Host "Publish step outcome: [${{ steps.publish.outcome }} ]"
173+ Write-Host "Publish step outcome: [$env:PUBLISH_OUTCOME ]"
172174
173175 if ($version -ne '999.0.0') {
174176 Write-Error "Expected placeholder version [999.0.0] but got [$version]."
175177 exit 1
176178 }
177- if ('${{ steps.publish.outcome }}' -eq 'success') {
179+ if ($env:PUBLISH_OUTCOME -eq 'success') {
178180 Write-Error 'The publish action should have failed for an unstamped artifact but it succeeded.'
179181 exit 1
180182 }
0 commit comments