Skip to content

Commit ec4d7e7

Browse files
committed
feat: add CycloneDX support and update release process for BOM generation
1 parent 0abf127 commit ec4d7e7

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

.github/workflows/sematic-releases.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,16 @@ jobs:
5151
# Token with permissions to push to the client repository
5252
CLIENT_REPO_TOKEN: ${{ secrets.CLIENT_REPO_TOKEN }}
5353
run: npx semantic-release
54+
- name: Get Version
55+
id: get_version
56+
run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV
57+
- name: Upload BOM to Dependency-Track
58+
uses: DependencyTrack/gh-upload-sbom@v3
59+
with:
60+
serverhostname: ${{ secrets.DEPENDENCYTRACK_HOSTNAME }}
61+
apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }}
62+
projectname: 'AntiRedstoneClock-Remastered'
63+
projectversion: ${{ env.VERSION }}
64+
projecttags: 'bukkit,paper,plugin'
65+
bomfilename: "build/reports/cyclonedx/bom.xml"
66+
autocreate: true

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@semantic-release/exec",
1111
{
1212
"verifyConditionsCmd": "./gradlew check",
13-
"publishCmd": "./gradlew -Pversion=${nextRelease.version} shadowJar publishAllPublicationsToHangar modrinth"
13+
"publishCmd": "./gradlew -Pversion=${nextRelease.version} shadowJar publishAllPublicationsToHangar modrinth cyclonedxBom && echo '${nextRelease.version}' > VERSION.txt"
1414
}
1515
],
1616
[

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ plugins {
1111
alias(libs.plugins.paper.yml)
1212
alias(libs.plugins.hangar)
1313
alias(libs.plugins.modrinth)
14+
alias(libs.plugins.cyclonedx)
1415
jacoco
1516
}
1617

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dependencyResolutionManagement {
2121
version("paper.yml", "0.6.0")
2222
version("paper.run", "3.0.2")
2323
version("shadowJar", "9.2.2")
24+
version("cyclonedx", "3.0.1")
2425

2526
version("paper", "1.21.8-R0.1-SNAPSHOT")
2627
version("bstats", "3.1.0")
@@ -93,6 +94,7 @@ dependencyResolutionManagement {
9394
plugin("paper.yml", "net.minecrell.plugin-yml.paper").versionRef("paper.yml")
9495
plugin("paper.run", "xyz.jpenilla.run-paper").versionRef("paper.run")
9596
plugin("shadowJar", "com.gradleup.shadow").versionRef("shadowJar")
97+
plugin("cyclonedx", "org.cyclonedx.bom").versionRef("cyclonedx")
9698
}
9799
}
98100
}

0 commit comments

Comments
 (0)