Skip to content

Commit

Permalink
#29944 Improving sbom generation job on legacy release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolina committed Oct 11, 2024
1 parent 9a204ec commit 76b3207
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/legacy-release_maven-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,20 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
zip ./artifacts/${{ steps.sbom-generator.outputs.sbom-artifact }}.zip ./artifacts/${{ steps.sbom-generator.outputs.sbom-artifact }}.json
gh release upload "${{ needs.prepare-release.outputs.release_tag }}" "./artifacts/${{ steps.sbom-generator.outputs.sbom-artifact }}.zip"
echo "::group::Upload SBOM Asset"
ARTIFACT_NAME=${{ steps.sbom-generator.outputs.sbom-artifact }}
SBOM="./artifacts/${ARTIFACT_NAME}/${ARTIFACT_NAME}.json"
if [ -f "${SBOM}" ]; then
echo "SBOM: ${SBOM}"
cat "${SBOM}"
zip "${ARTIFACT_NAME}.zip" "${SBOM}"
gh release upload "${{ needs.prepare-release.outputs.release_tag }}" "${ARTIFACT_NAME}.zip"
else
echo "SBOM artifact not found."
fi
echo "::endgroup::"
finish-release:
name: Finish Release
Expand Down

0 comments on commit 76b3207

Please sign in to comment.