File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed
Expand file tree Collapse file tree 1 file changed +32
-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- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3-
41name : Build Release Branches
52
63on :
2118 dotnet-version : ' 9.0.x'
2219 - name : Restore dependencies
2320 run : dotnet restore ./src/EPPlus.sln
21+
22+ # --- SBOM ---
23+ - name : Install CycloneDX
24+ run : dotnet tool install --global CycloneDX
25+ - name : Read version from csproj
26+ id : read_version
27+ run : |
28+ $version = ([xml](Get-Content ./src/EPPlus/EPPlus.csproj)).Project.PropertyGroup.Version | Where-Object { $_ } | Select-Object -First 1
29+ echo "VERSION=$version" >> $env:GITHUB_ENV
30+ shell : pwsh
31+ - name : Generate SBOM
32+ 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
33+ # --- SBOM ---
34+
2435 - name : Build
2536 run : dotnet build ./src/EPPlus.sln --no-restore --configuration Release
2637 - name : Test
7081 with :
7182 name : signed-nuget-package
7283 path : ./output/*.nupkg
84+ # --- SBOM ---
85+ - name : Upload SBOM to Azure Blob Storage
86+ run : |
87+ az storage blob upload `
88+ --account-name eppluswebprod `
89+ --container-name sbom `
90+ --name epplus-${{ env.VERSION }}.sbom.json `
91+ --file ./sbom/epplus-${{ env.VERSION }}.sbom.json `
92+ --auth-mode login `
93+ --overwrite
94+ shell : pwsh
95+
96+ - name : Upload SBOM as artifact
97+ uses : actions/upload-artifact@v4
98+ with :
99+ name : sbom
100+ path : ./sbom/epplus-${{ env.VERSION }}.sbom.json
101+ # --- SBOM ---
You can’t perform that action at this time.
0 commit comments