Update kyori to v4.16.0 #2183
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Gradle | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Only run on PRs if the source branch is on someone else's repo | |
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Execute Gradle build | |
run: ./gradlew build test --stacktrace | |
- name: Prepare Upload | |
run: | | |
projectVersion=$(grep '^mavenVersion=' gradle.properties | cut -d'=' -f2) | |
mkdir build/upload | |
cp build/libs/SoulFire-$projectVersion.jar build/upload | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SoulFire | |
if-no-files-found: error | |
path: | | |
build/upload/SoulFire-*.jar | |
jpackage-linux: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: SoulFire | |
path: build/libs | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Install rpm | |
run: sudo apt-get install rpm | |
- name: Package with jpackage | |
run: | | |
projectVersion=$(grep '^mavenVersion=' gradle.properties | cut -d'=' -f2) | |
projectVersionStripped=${projectVersion/-SNAPSHOT/} | |
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-linux.cfg" --type rpm | |
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-linux.cfg" --type deb | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-installer | |
if-no-files-found: error | |
path: | | |
build/distributions/* | |
jpackage-windows: | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: SoulFire | |
path: build/libs | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Package with jpackage | |
run: | | |
$projectVersion = Select-String -Path gradle.properties -Pattern '^mavenVersion=' | ForEach-Object { $_.ToString().Split('=')[1] } | |
$projectVersionStripped = $projectVersion -replace '-SNAPSHOT', '' | |
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-windows.cfg" | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-installer | |
if-no-files-found: error | |
path: | | |
build/distributions/* | |
jpackage-mac: | |
needs: build | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: SoulFire | |
path: build/libs | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Package with jpackage | |
run: | | |
projectVersion=$(grep '^mavenVersion=' gradle.properties | cut -d'=' -f2) | |
projectVersionStripped=${projectVersion/-SNAPSHOT/} | |
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-mac.cfg" | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mac-installer | |
if-no-files-found: error | |
path: | | |
build/distributions/* |