Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
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
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" }
Loading