-
Notifications
You must be signed in to change notification settings - Fork 2
ci(publish): build, sign, pack, sbom generation and publish jobs #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
turbobobbytraykov
wants to merge
24
commits into
master
Choose a base branch
from
btraykov/sbom-generation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
91aea4d
SBOM generation - initial implementation
turbobobbytraykov c3de943
use the sbom-tool as a dotnet tool instead
turbobobbytraykov f8cafc4
Use pinned SHAs for all github actions instead of release versions - …
turbobobbytraykov 16b3990
Generate SPDX 3.0 SBOM as it's the newer standard
turbobobbytraykov 1e5ca20
SBOM generation - initial implementation
turbobobbytraykov 8806047
use the sbom-tool as a dotnet tool instead
turbobobbytraykov c39551e
Use pinned SHAs for all github actions instead of release versions - …
turbobobbytraykov a4d1ec5
Generate SPDX 3.0 SBOM as it's the newer standard
turbobobbytraykov b6f69b9
Strong-name signing for the assemblies
turbobobbytraykov 976db8b
ci(publish): split release workflow into build, sign, pack, sbom gene…
turbobobbytraykov 2bd6125
ci (authenticity): Strong-name signing for assemblies (#32)
damyanpetev bcc0109
Merge branch 'btraykov/sbom-generation' of https://github.com/IgniteU…
turbobobbytraykov 5990830
Refactoring, hardening and adding CycloneDX SBOM
turbobobbytraykov de00a26
Explicitly wait for the pack job to complete before doing dependency-…
turbobobbytraykov 917e071
Clarity use case for -enable-github-licenses when generating CycloneD…
turbobobbytraykov 72405b6
Use a separate GH environment so that the strong name key can be prot…
turbobobbytraykov c708b32
Update SBOM generation script to report author coverage instead of su…
turbobobbytraykov 6825758
Validate all signatures of the package's contents in a single go - 2 …
turbobobbytraykov fae28db
Merge branch 'btraykov/sbom-generation' of https://github.com/IgniteU…
turbobobbytraykov 5844c1f
Remove the now obsolete Assert-PackageStrongName.ps1 script - it has …
turbobobbytraykov 8eec341
CycloneDX SBOM for the npm assets
turbobobbytraykov b3473a3
Remove the pointless gate - checking the release version as a SemVer
turbobobbytraykov 100a4b9
Use the version as a powershell env variable
turbobobbytraykov 5f30e73
More tweaks to the release workflow
turbobobbytraykov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "version": 1, | ||
| "isRoot": true, | ||
| "tools": { | ||
| "microsoft.sbom.dotnettool": { | ||
| "version": "4.1.5", | ||
| "commands": [ | ||
| "sbom-tool" | ||
| ], | ||
| "rollForward": true | ||
|
turbobobbytraykov marked this conversation as resolved.
Outdated
|
||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| name: Generate SBOM | ||
|
|
||
| # Runs when the 'generate sbom' label is added to a PR, or when a release is published. | ||
| # Uses the sbom-tool CLI (version pinned in .config/sbom-tool/dotnet-tools.json) | ||
| # so the NuGet package is never modified and no SBOM is embedded in it. | ||
| on: | ||
| pull_request: | ||
| types: [labeled] | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: sbom-${{ github.event_name == 'release' && github.ref_name || github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| BUILD_CONFIGURATION: Release | ||
| PACKAGE_VERSION: ${{ github.event_name == 'release' && github.ref_name || format('0.0.0-pr.{0}', github.event.pull_request.number) }} | ||
|
|
||
| jobs: | ||
| sbom: | ||
| if: github.event_name == 'release' || github.event.label.name == 'generate sbom' | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: "10.0.x" | ||
|
|
||
| - uses: actions/setup-node@v6.4.0 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - run: npm ci | ||
| working-directory: src/IgniteUI.Blazor.GridLite | ||
|
|
||
| - run: npm run build | ||
| working-directory: src/IgniteUI.Blazor.GridLite | ||
|
|
||
| - name: Pack NuGet package | ||
| run: > | ||
| dotnet pack src/IgniteUI.Blazor.GridLite/IgniteUI.Blazor.GridLite.csproj | ||
| --configuration ${{ env.BUILD_CONFIGURATION }} | ||
| -p:RunNodeBuild=false | ||
| -p:GeneratePackageOnBuild=false | ||
| -p:Version=${{ env.PACKAGE_VERSION }} | ||
| -o ./artifacts | ||
|
|
||
|
turbobobbytraykov marked this conversation as resolved.
Outdated
|
||
| # Dedicated nested manifest keeps sbom-tool out of the root 'dotnet tool restore' used by publish.yml | ||
| - name: Restore sbom-tool (pinned) | ||
| run: dotnet tool restore --tool-manifest .config/sbom-tool/dotnet-tools.json | ||
|
|
||
| # -b: the shipped artifact (nupkg) gets listed with its hash in the SBOM's files section | ||
| # -bc: dependency detection scans the project dir (NuGet + npm) | ||
| - name: Generate SBOM | ||
| working-directory: .config/sbom-tool | ||
| run: > | ||
| dotnet tool run sbom-tool -- generate | ||
| -b ${{ github.workspace }}/artifacts | ||
|
turbobobbytraykov marked this conversation as resolved.
Outdated
|
||
| -bc ${{ github.workspace }}/src/IgniteUI.Blazor.GridLite | ||
| -pn IgniteUI.Blazor.GridLite | ||
| -pv ${{ env.PACKAGE_VERSION }} | ||
| -ps Infragistics | ||
| -nsb http://spdx.org/spdxdocs/IgniteUI.Blazor.GridLite | ||
|
turbobobbytraykov marked this conversation as resolved.
Outdated
|
||
| -V Information | ||
|
|
||
| - name: Verify SBOM | ||
| run: | | ||
| set -euo pipefail | ||
| test -s artifacts/_manifest/spdx_2.2/manifest.spdx.json | ||
| test -s artifacts/_manifest/spdx_2.2/manifest.spdx.json.sha256 | ||
| echo "SBOM generated successfully." | ||
|
|
||
| - name: Upload NuGet package | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: nupkg | ||
| path: artifacts/*.nupkg | ||
| retention-days: 1 | ||
| if-no-files-found: error | ||
|
|
||
| - name: Upload SBOM files | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: sbom-spdx_2.2 | ||
| path: artifacts/_manifest/spdx_2.2 | ||
| retention-days: 1 | ||
| if-no-files-found: error | ||
|
|
||
| attach-to-release: | ||
| if: github.event_name == 'release' | ||
| needs: sbom | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # required to upload release assets | ||
|
|
||
| steps: | ||
| - name: Download SBOM artifact | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: sbom-spdx_2.2 | ||
| path: spdx_2.2 | ||
|
|
||
| - name: Attach SBOM to release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TAG: ${{ github.ref_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| asset="IgniteUI.Blazor.GridLite.${TAG}.spdx_2.2.zip" | ||
| (cd spdx_2.2 && zip -r "../${asset}" .) | ||
| gh release upload "$TAG" "$asset" --clobber -R "${{ github.repository }}" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.