Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: PR Lint

# Conventional Commits on the PR title and every commit on the branch.
# release-please parses those commit types to decide the version bump and to
# build the changelog - a non-conventional commit silently produces neither.
on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
contents: read
pull-requests: read

jobs:
lint:
uses: OneLiteFeatherNET/workflows/.github/workflows/pr-lint.yml@v2.8.1
secrets: inherit
29 changes: 28 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,31 @@ jobs:
with:
java-version: "25.0.3"
java-distribution: "temurin"
secrets: inherit
secrets: inherit
sbom:
name: Attach SBOM to release
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.release-please.outputs.tag_name }}

- name: Generate CycloneDX SBOM
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
format: cyclonedx
output: bom.json
exit-code: '0'

- name: Attach SBOM to the release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.release-please.outputs.tag_name }}
run: gh release upload "$TAG" bom.json --clobber
55 changes: 55 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Security

# Trivy vulnerability gate plus a CycloneDX SBOM of the repository. Self-contained
# on purpose: it needs no build tool and no registry credentials, so it is the
# baseline security gate for every repository regardless of language.
on:
pull_request:
push:
branches: [main]
schedule:
- cron: "50 4 * * 1"
workflow_dispatch:
permissions:
contents: read
security-events: write

jobs:
trivy:
name: Trivy scan
uses: OneLiteFeatherNET/workflows/.github/workflows/security-scan.yml@v2.8.1
with:
scan-type: "fs"
scanners: "vuln,secret"
severity: "CRITICAL,HIGH"
# Report-only for now, so adopting this does not turn CI red on day one.
fail-on-findings: false
upload-sarif: true
secrets: inherit

sbom:
name: CycloneDX SBOM
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Generate SBOM
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
format: cyclonedx
output: bom.json
# An SBOM is an inventory, not a finding list - never fail on it.
exit-code: '0'

- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom-cyclonedx
path: bom.json
if-no-files-found: error
retention-days: 90
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins {
jacoco
}

version = "1.15.2" // x-release-please-version

dependencies {

compileOnly(libs.paper)
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
extends: ['@commitlint/config-conventional'],
};
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ org.gradle.unsafe.configuration-cache=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2048M

version = 1.15.2 # x-release-please-version
group = net.onelitefeather
5 changes: 4 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"package-name": "stardust",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"gradle.properties"
{
"type": "generic",
"path": "build.gradle.kts"
}
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"github>OneLiteFeatherNET/renovate:default(OneLiteFeatherNET/stardust-maintainers)",
"github>OneLiteFeatherNET/renovate:paper"
]
}
}
Loading