File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 2929 env :
3030 ONELITEFEATHER_MAVEN_USERNAME : ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }}
3131 ONELITEFEATHER_MAVEN_PASSWORD : ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }}
32+ - name : Generate CycloneDX BOM
33+ run : ./gradlew cyclonedxBom
34+ - name : Strip leading v from tag
35+ if : startsWith(github.ref, 'refs/tags/')
36+ run : echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
37+ - run : |
38+ echo "Version: $VERSION"
39+ name: Display Version
40+ - name : Upload BOM to Dependency-Track
41+ uses : DependencyTrack/gh-upload-sbom@v3
42+ with :
43+ serverhostname : ${{ secrets.DEPENDENCYTRACK_HOSTNAME }}
44+ apikey : ${{ secrets.DEPENDENCYTRACK_APIKEY }}
45+ projectname : " Mycelium-Bom"
46+ projectversion : ${{ env.VERSION }}
47+ projecttags : ' bom,minestom'
48+ bomfilename : " build/reports/cyclonedx/bom.xml"
49+ autocreate : true
50+ parent : ' 9a10b066-ecf1-4b38-b670-a197dcd5556a'
Original file line number Diff line number Diff line change 11plugins {
22 `maven- publish`
33 `java- platform`
4+ alias(libs.plugins.cyclonedx)
45}
56
67group = " net.onelitefeather"
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ dependencyResolutionManagement {
2626 version(" junit.bom" , " 6.0.1" )
2727 version(" mockito" , " 5.20.0" )
2828 version(" cyano" , " 0.4.1" )
29+ version(" cyclonedx" , " 3.0.1" )
2930
3031 library(" minestom" ," net.minestom" , " minestom" ).versionRef(" minestom" )
3132 library(" cyano" , " net.onelitefeather" , " cyano" ).versionRef(" cyano" )
@@ -37,6 +38,8 @@ dependencyResolutionManagement {
3738 // Mock libraries
3839 library(" mockito-core" , " org.mockito" , " mockito-core" ).versionRef(" mockito" )
3940 library(" mockito-junit-jupiter" , " org.mockito" , " mockito-junit-jupiter" ).versionRef(" mockito" )
41+
42+ plugin(" cyclonedx" , " org.cyclonedx.bom" ).versionRef(" cyclonedx" )
4043 }
4144 }
4245}
You can’t perform that action at this time.
0 commit comments