Compare commits

...
4 Commits
Author SHA1 Message Date
Dan Mulloy 69443c83e2 Add link in Readme 2025-08-10 16:34:40 -05:00
Dan Mulloy 3933294b36 Only run on master 2025-08-10 16:32:47 -05:00
Dan Mulloy 32e93765d5 Try specifying SHA a different way 2025-08-10 16:29:51 -05:00
Dan Mulloy f1fe2737bb Create standing dev release on GitHub 2025-08-10 16:15:51 -05:00
4 changed files with 49 additions and 5 deletions

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
name: ProtocolLib development build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Run gradle build lifecycle
run: |
COMMIT_SHA=${{ github.sha }} ./gradlew build shadowJar --no-daemon
- name: Upload plugin file
uses: actions/upload-artifact@v4
with:
name: ProtocolLib
path: build/libs/ProtocolLib.jar
- name: Create or update GitHub pre-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
SHORT_HASH=$(echo "${{ github.sha }}" | cut -c1-7)
RELEASE_NOTES=$(gh release view dev-build --repo ${{ github.repository }} --json body -q ".body" 2>/dev/null || echo "")
gh release view dev-build --repo ${{ github.repository }} || \
gh release create dev-build --prerelease --title "Development Build" --notes "## Changelog" --repo ${{ github.repository }}
NEW_NOTES="$RELEASE_NOTES"$'\n'"* [$SHORT_HASH] $COMMIT_MSG"
gh release edit dev-build --notes "$NEW_NOTES" --repo ${{ github.repository }}
gh release upload dev-build build/libs/ProtocolLib.jar#ProtocolLib.jar --clobber --repo ${{ github.repository }}
+1
View File
@@ -14,6 +14,7 @@ lead to more subtle bugs.
* [Spigot Page](https://spigotmc.org/resources/protocollib.1997/)
* [Releases](https://github.com/dmulloy2/ProtocolLib/releases)
* [Dev Build](https://github.com/dmulloy2/ProtocolLib/releases/tag/dev-build)
* [JavaDoc](https://dmulloy2.net/ProtocolLib/javadoc/)
* [Protocol Wiki](https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Protocol)
+4 -4
View File
@@ -16,11 +16,11 @@ description = "Provides access to the Minecraft protocol"
val mcVersion = "1.21.8"
val isSnapshot = version.toString().endsWith("-SNAPSHOT")
val buildNumber = System.getenv("BUILD_NUMBER") ?: ""
val isJenkins = buildNumber.isNotEmpty()
val commitHash = System.getenv("COMMIT_SHA") ?: ""
val isCI = commitHash.isNotEmpty()
repositories {
if (!isJenkins) {
if (!isCI) {
mavenLocal()
}
@@ -75,7 +75,7 @@ java {
tasks {
processResources {
val fullVersion = if (isSnapshot && isJenkins) "${version}-${buildNumber}" else version
val fullVersion = if (isSnapshot && isCI) "${version}-${commitHash.take(7)}" else version
eachFile {
expand("version" to fullVersion)
+1 -1
View File
@@ -1,4 +1,4 @@
version=5.4.0
version=5.4.1-SNAPSHOT
mavenCentralUsername=
mavenCentralPassword=
signing.keyId=