Skip to content

Commit 3aa9ea0

Browse files
committed
feat: Add configuration files for GitHub Actions and update project metadata
BREAKING CHANGE: We switched to sematic releases
1 parent 32d35cc commit 3aa9ea0

14 files changed

Lines changed: 6900 additions & 173 deletions

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @OneLiteFeatherNET/stardust-maintainers
2+
/.github/CODEOWNERS @OneLiteFeatherNET/core-team

.github/workflows/build-pr.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build PR
2+
on: [pull_request]
3+
jobs:
4+
build_pr:
5+
if: github.repository_owner == 'OneLiteFeatherNET'
6+
name: Build Pull Request Branch
7+
runs-on: ${{ matrix.os }}
8+
env:
9+
ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }}
10+
ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: temurin
21+
java-version: 24
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v4
24+
- name: Build on ${{ matrix.os }}
25+
run: ./gradlew clean build test
26+
- name: Generate JaCoCo Coverage Report
27+
if: matrix.os == 'ubuntu-latest'
28+
run: ./gradlew jacocoRootReport
29+
- name: Upload Coverage Report
30+
if: matrix.os == 'ubuntu-latest'
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: jacoco-report
34+
path: |
35+
build/reports/jacoco/jacocoRootReport/html/
36+
build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
37+
- name: Upload Coverage to Codecov
38+
if: matrix.os == 'ubuntu-latest'
39+
uses: codecov/codecov-action@v5
40+
with:
41+
file: build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
42+
fail_ci_if_error: false
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
comment: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Close invalid PRs
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened ]
6+
7+
jobs:
8+
run:
9+
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'main' }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: superbrothers/close-pull-request@v3
13+
with:
14+
comment: "Please do not open pull requests from the `main` branch, create a new branch instead."
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
"on":
3+
push:
4+
branches:
5+
- main
6+
- next
7+
- beta
8+
- "*.x"
9+
10+
permissions:
11+
contents: read # for checkout
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write # to be able to publish a GitHub release
19+
issues: write # to be able to comment on released issues
20+
pull-requests: write # to be able to comment on released pull requests
21+
id-token: write # to enable use of OIDC for npm provenance
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "lts/*"
31+
- name: Validate Gradle Wrapper
32+
uses: gradle/actions/wrapper-validation@v4
33+
- name: Setup Java
34+
uses: actions/setup-java@v4
35+
with:
36+
distribution: temurin
37+
java-version: 24
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v4
40+
- name: Install dependencies
41+
run: npm clean-install
42+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
43+
run: npm audit signatures
44+
- name: Release
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }}
49+
ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }}
50+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ fabric.properties
4747
gradle-app.setting
4848
!gradle-wrapper.jar
4949
.gradletasknamecache
50+
node_modules/

.gitlab-ci.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.releaserc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"plugins": [
3+
[
4+
"@semantic-release/commit-analyzer",
5+
{
6+
"preset": "conventionalcommits"
7+
}
8+
],
9+
"@semantic-release/release-notes-generator",
10+
[
11+
"@semantic-release/exec",
12+
{
13+
"verifyConditionsCmd": "./gradlew check",
14+
"publishCmd": "./gradlew -Pversion=${nextRelease.version} publish"
15+
}
16+
],
17+
"@semantic-release/git",
18+
[
19+
"@semantic-release/github",
20+
{
21+
"assets": [
22+
{
23+
"path": "build/libs/stardust.jar"
24+
}
25+
],
26+
"labels": false,
27+
"failTitle": false,
28+
"failComment": false,
29+
"successComment": false,
30+
"releasedLabels": false,
31+
"addReleases": false
32+
}
33+
]
34+
]
35+
}

README.md

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,2 @@
1-
# Template Project
2-
3-
[[_TOC_]]
4-
5-
## How to prepare my project
6-
7-
Edit following files:
8-
- settings.gradle.kts
9-
- build.gradle.kts
10-
- .gitlab-ci.yml
11-
12-
13-
---
14-
### runPaper plugin configuration
15-
16-
Tasks section
17-
```kt
18-
tasks {
19-
runServer {
20-
minecraftVersion("1.19.3")
21-
}
22-
}
23-
```
24-
25-
26-
### shadowJar plugin configuration
27-
28-
Tasks section
29-
```kt
30-
tasks {
31-
shadowJar {
32-
archiveFileName.set("${rootProject.name}.${archiveExtension.getOrElse("jar")}")
33-
}
34-
}
35-
```
36-
37-
### bukkit plugin configuration
38-
39-
Bukkit section
40-
41-
```kt
42-
tasks {
43-
TODO("")
44-
}
45-
bukkit {
46-
main = "${rootProject.group}.MAINCLASS"
47-
apiVersion = "1.19"
48-
author = "ExampleDeveloper"
49-
depend = listOf("FastAsyncWorldEdit")
50-
}
51-
52-
```
53-
### sonarqube plugin configuration
54-
55-
sonarqube section
56-
1+
# StarDust
2+
This is a simple essentials plugin for Minecraft servers, providing various quality-of-life features.

0 commit comments

Comments
 (0)