fix deprecation, simplified
This commit is contained in:
@@ -21,31 +21,20 @@ jobs:
|
||||
java-version: "21"
|
||||
check-latest: true
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v3
|
||||
|
||||
- name: Read mod version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(grep '^mod_version' gradle.properties | head -n 1 | cut -d'=' -f2 | xargs)
|
||||
echo "mod_version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build release JAR
|
||||
- name: Build (release)
|
||||
run: ./gradlew clean build -x test --no-daemon --stacktrace
|
||||
|
||||
- name: Prepare release artifact
|
||||
run: |
|
||||
VERSION="${{ steps.get_version.outputs.mod_version }}"
|
||||
mkdir -p build/release
|
||||
# Source JAR should already be saturnclient-<version>.jar
|
||||
cp "build/libs/saturnclient-${VERSION}.jar" "build/release/saturnclient-${VERSION}.jar"
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "saturnclient-${{ steps.get_version.outputs.mod_version }}"
|
||||
path: "build/release/saturnclient-${{ steps.get_version.outputs.mod_version }}.jar"
|
||||
name: saturnclient-latest
|
||||
path: build/libs/saturnclient-*.jar
|
||||
if-no-files-found: error
|
||||
|
||||
Reference in New Issue
Block a user