File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,6 +249,20 @@ jobs:
249249 $env:PATH += ";$env:USERPROFILE\.dotnet\tools"
250250 sbom-tool generate -b ./artifacts -bc . -pn ThreadPilot -pv "${{ steps.version.outputs.version }}" -ps PrimeBuild -nsb https://github.com/PrimeBuild-pc/ThreadPilot
251251
252+ $sbomReleaseDir = "artifacts/release/sbom"
253+ New-Item -ItemType Directory -Force -Path $sbomReleaseDir | Out-Null
254+
255+ $sbomManifest = Get-ChildItem "_manifest" -Recurse -File -Filter "manifest.spdx.json" -ErrorAction SilentlyContinue |
256+ Sort-Object LastWriteTimeUtc -Descending |
257+ Select-Object -First 1
258+
259+ if (-not $sbomManifest)
260+ {
261+ throw "SBOM manifest not found under _manifest after generation."
262+ }
263+
264+ Copy-Item -LiteralPath $sbomManifest.FullName -Destination (Join-Path $sbomReleaseDir "manifest.spdx.json") -Force
265+
252266 - name : Upload portable artifact
253267 uses : actions/upload-artifact@v4
254268 with :
@@ -283,7 +297,8 @@ jobs:
283297 uses : actions/upload-artifact@v4
284298 with :
285299 name : sbom
286- path : _manifest/spdx_2.2/manifest.spdx.json
300+ path : artifacts/release/sbom/manifest.spdx.json
301+ if-no-files-found : error
287302
288303 smoke-test :
289304 runs-on : windows-latest
You can’t perform that action at this time.
0 commit comments