Skip to content

Commit d45ce3b

Browse files
committed
Added checksum creation for sbom v8.5.0
1 parent 5068264 commit d45ce3b

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/Build-Release.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
name: Build Release Branches
26

37
on:
@@ -30,6 +34,12 @@ jobs:
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 ---

0 commit comments

Comments
 (0)