File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build, test, sign and pack the release branches for EPPlus.
2+ # It will also generate and publish an SBOM
3+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
4+
15name : Build Release Branches
26
37on :
3034 shell : pwsh
3135 - name : Generate SBOM
3236 run : dotnet CycloneDX ./src/EPPlus/EPPlus.csproj -o ./sbom -F Json -st Library -sv ${{ env.VERSION }} -fn epplus-${{ env.VERSION }}.sbom.json -imp ./src/EPPlus/sbom-metadata-template.xml
37+ - name : Generate SHA-256 checksum for SBOM
38+ run : |
39+ $sbomFile = "./sbom/epplus-${{ env.VERSION }}.sbom.json"
40+ $hash = (Get-FileHash -Path $sbomFile -Algorithm SHA256).Hash.ToLower()
41+ "$hash epplus-${{ env.VERSION }}.sbom.json" | Out-File -FilePath "./sbom/epplus-${{ env.VERSION }}.sbom.json.sha256" -Encoding utf8NoBOM
42+ shell : pwsh
3343 # --- SBOM ---
3444
3545 - name : Build
@@ -92,10 +102,21 @@ jobs:
92102 --auth-mode login `
93103 --overwrite
94104 shell : pwsh
95-
105+ - name : Upload SBOM checksum to Azure Blob Storage
106+ run : |
107+ az storage blob upload `
108+ --account-name eppluswebprod `
109+ --container-name sbom `
110+ --name epplus-${{ env.VERSION }}.sbom.json.sha256 `
111+ --file ./sbom/epplus-${{ env.VERSION }}.sbom.json.sha256 `
112+ --auth-mode login `
113+ --overwrite
114+ shell : pwsh
96115 - name : Upload SBOM as artifact
97116 uses : actions/upload-artifact@v4
98117 with :
99118 name : sbom
100- path : ./sbom/epplus-${{ env.VERSION }}.sbom.json
101- # --- SBOM ---
119+ path : |
120+ ./sbom/epplus-${{ env.VERSION }}.sbom.json
121+ ./sbom/epplus-${{ env.VERSION }}.sbom.json.sha256
122+ # --- SBOM ---
You can’t perform that action at this time.
0 commit comments