@@ -0,0 +1,45 @@
|
|||||||
|
name: Automate Gradlew Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: "temurin"
|
||||||
|
java-version: "21"
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Set up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v3
|
||||||
|
with:
|
||||||
|
gradle-home-cache-cleanup: false
|
||||||
|
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
- name: Build (release)
|
||||||
|
run: ./gradlew clean build -x test --no-daemon --stacktrace
|
||||||
|
|
||||||
|
- name: Remove sources JARs
|
||||||
|
run: |
|
||||||
|
rm -f build/libs/*sources*.jar
|
||||||
|
echo "Removed sources JARs from build/libs"
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: saturnclient-latest
|
||||||
|
path: build/libs/saturnclient-*.jar
|
||||||
|
if-no-files-found: error
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
name: Push Builds
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: "temurin"
|
||||||
|
java-version: "21"
|
||||||
|
|
||||||
|
- name: Set up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v3
|
||||||
|
with:
|
||||||
|
gradle-home-cache-cleanup: false
|
||||||
|
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./gradlew clean build -x test --no-daemon --stacktrace
|
||||||
|
|
||||||
|
- name: Remove sources JARs
|
||||||
|
run: |
|
||||||
|
rm -f build/libs/*sources*.jar
|
||||||
|
echo "Removed sources JARs from build/libs"
|
||||||
|
|
||||||
|
- name: Create timestamped JAR
|
||||||
|
run: |
|
||||||
|
TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S")
|
||||||
|
MAIN_JAR=$(ls build/libs/saturnclient-*.jar | head -1)
|
||||||
|
cp "$MAIN_JAR" "saturnclient-${TIMESTAMP}.jar"
|
||||||
|
echo "Created: saturnclient-${TIMESTAMP}.jar"
|
||||||
|
|
||||||
|
- name: Upload timestamped artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: saturnclient-${{ github.run_number }}
|
||||||
|
path: saturnclient-*.jar
|
||||||
|
if-no-files-found: error
|
||||||
+1
-1
@@ -11,7 +11,7 @@ yarn_mappings=1.21.4+build.7
|
|||||||
loader_version=0.16.10
|
loader_version=0.16.10
|
||||||
fabric_version=0.114.0+1.21.4
|
fabric_version=0.114.0+1.21.4
|
||||||
|
|
||||||
mod_version = 0.0.5-beta2
|
mod_version = 0.0.6-beta1
|
||||||
maven_group = org.saturnclient
|
maven_group = org.saturnclient
|
||||||
archives_base_name = saturnclient
|
archives_base_name = saturnclient
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user