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

categories:
- title: 'Features'
labels:
- 'feature'
Comment thread
num0001 marked this conversation as resolved.
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
Comment thread
num0001 marked this conversation as resolved.
- 'bug'
- title: 'Maintenance'
labels:
- 'chore'
Comment thread
num0001 marked this conversation as resolved.
- 'dependencies'
- 'documentation'

change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
change-title-escapes: '\<*_&'

template: |
## What's Changed

$CHANGES

Comment thread
num0001 marked this conversation as resolved.
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
41 changes: 41 additions & 0 deletions .github/workflows/release-draft.yml
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@v5
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@v4

- name: Compute next version
id: version
run: |
NEXT="$(./gradlew -q printVersion)"
Comment thread
num0001 marked this conversation as resolved.
echo "next=${NEXT}" >> "$GITHUB_OUTPUT"

- name: Update release draft
uses: release-drafter/release-drafter@v6
Comment thread
num0001 marked this conversation as resolved.
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@v5
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/checkout@v5
- 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@v4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: gradle/actions/setup-gradle@v4
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@v2
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3

with:
files: build/libs/*.jar
fail_on_unmatched_files: true
3 changes: 3 additions & 0 deletions .vscode/settings.json
Comment thread
num0001 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
7 changes: 2 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 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" }