Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: 'Features'
labels:
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'bug'
- title: 'Maintenance'
labels:
- 'dependencies'
- 'documentation'

change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
Comment thread
Cinnazeyy marked this conversation as resolved.
change-title-escapes: '\<*_&'

template: |
## What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
steps:
- name: Checkout PR merge commit
if: github.event_name == 'pull_request'
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
fetch-depth: 0
fetch-tags: true

- name: Checkout main on push
if: github.event_name == 'push'
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -36,12 +36,12 @@ jobs:
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v6

- name: Build with Gradle Wrapper
run: ./gradlew clean build

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: Staging-Build
path: build/libs
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release-draft.yml
Comment thread
num0001 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Release Draft

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: read

jobs:
update-draft:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true

- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Compute next release version
id: version
run: |
NEXT="$(./gradlew -q printNextReleaseVersion)"
echo "next=${NEXT}" >> "$GITHUB_OUTPUT"
- name: Update release draft
uses: release-drafter/release-drafter@v7
with:
version: ${{ steps.version.outputs.next }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Attach Release Artifacts

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.event.release.tag_name }}

- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Build with Gradle Wrapper
run: ./gradlew clean build

- name: Attach shaded JAR to release
uses: softprops/action-gh-release@v3
with:
files: build/libs/*.jar
fail_on_unmatched_files: true
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,23 @@ dedicated to the Plot-System itself.</br>
* Submitting a fix
* Proposing new features

### Commit Naming Conventions

To keep our commit history clean and readable, please follow a naming convention for your commits by using one of the
following prefixes (based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)):

* `feat:` - A new feature
* `fix:` - A bug fix
* `docs:` - Documentation only changes
* `style:` - Changes that do not affect the meaning of the code (white-space, formatting, etc.)
* `refactor:` - A code change that neither fixes a bug nor adds a feature
* `perf:` - A code change that improves performance
* `test:` - Adding missing tests or correcting existing tests
* `chore:` - Changes to the build process or auxiliary tools and libraries

If no recognized prefix is provided, the maintainers may ask you to revise your commit message, or they may squash and
rename the commit with an appropriate prefix upon merging.

# License
Distributed under the MIT License. See `LICENSE` for more information.

Expand Down
14 changes: 9 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
java
alias(libs.plugins.git.version)
alias(libs.plugins.git.semver)
alias(libs.plugins.shadow)
}

Expand Down Expand Up @@ -61,11 +61,8 @@ dependencies {
compileOnly(libs.io.papermc.paper.paper.api)
}

val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()

group = "com.alpsbte"
version = "5.0.3" + "-" + details.gitHash + "-SNAPSHOT"
version = semver.semVersion
description = "An easy to use building system for the BuildTheEarth project."
java.sourceCompatibility = JavaVersion.VERSION_21

Expand All @@ -92,6 +89,13 @@ tasks.jar {
enabled = false // Disable the default jar task since we are using shadowJar
}

tasks.register("printNextReleaseVersion") {
val nextRelease = semver.version.toString().removeSuffix("-SNAPSHOT")
doLast {
println(nextRelease)
}
}

tasks.processResources {
// work around IDEA-296490
duplicatesStrategy = DuplicatesStrategy.INCLUDE
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ org-mariadb-jdbc-mariadb-java-client = "3.5.7" # https://central.sonatype.com/a
com-intellectualsites-bom-bom-newest = "1.55" # Ref: https://github.com/IntellectualSites/bom
# Plugins
shadow = "9.3.1" # https://github.com/GradleUp/shadow/releases
git-version = "5.0.0" # https://github.com/palantir/gradle-git-version/releases
git-semver = "0.19.0" # https://github.com/jmongard/Git.SemVersioning.Gradle/releases

[libraries]
com-alpsbte-alpslib-alpslib-hologram = { module = "com.alpsbte.alpslib:alpslib-hologram", version.ref = "com-alpsbte-alpslib-alpslib-hologram" }
Expand All @@ -41,5 +41,5 @@ org-mariadb-jdbc-mariadb-java-client = { module = "org.mariadb.jdbc:mariadb-java
com-intellectualsites-bom-bom-newest = { module = "com.intellectualsites.bom:bom-newest", version.ref = "com-intellectualsites-bom-bom-newest" }

[plugins]
git-version = { id = "com.palantir.git-version", version.ref = "git-version" }
git-semver = { id = "com.github.jmongard.git-semver-plugin", version.ref = "git-semver" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }