diff --git a/.github/workflows/github-prerelease.yml b/.github/workflows/github-prerelease.yml index fe25cf9cb..176e3cca5 100644 --- a/.github/workflows/github-prerelease.yml +++ b/.github/workflows/github-prerelease.yml @@ -28,7 +28,7 @@ jobs: - name: Use tag run: echo ${{steps.tag.outputs.tag}} - jar: + jar-and-media: needs: preparations runs-on: ubuntu-latest @@ -54,20 +54,26 @@ jobs: with: gradle-version: wrapper + - uses: luangong/setup-install4j@v1 + with: + version: 10.0.7 + license: ${{ secrets.INSTALL4J_LICENSE }} + - name: Build release env: GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test + ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build media --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: build-artifacts + name: jar-media-build-artifacts path: | + media serverpackcreator-api/build serverpackcreator-app/build serverpackcreator-cli/build @@ -87,283 +93,20 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: jar-release-artifacts + name: jar-media-release path: | + media/*.deb + media/*.rpm + media/*.dmg + media/*.sh + media/*.gz + media/*.exe + media/*.zip serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - mac-01: - runs-on: macos-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename MacOs - run: mv serverpackcreator-app/build/dist/ServerPackCreator*.pkg serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: mac-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: mac-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - windows-01: - runs-on: windows-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Prepare wix-toolset - run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename Windows - run: mv serverpackcreator-app/build/dist/ServerPackCreator*.msi serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - windows-02: - runs-on: windows-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - id: java - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - cache: 'gradle' - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Prepare wix-toolset - run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - - - name: Prepare - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar --info --full-stacktrace - - - name: Build Image - run: | - $Version = "${{ needs.preparations.outputs.version }}".split("-") - jpackage ` - --app-version $Version[0] ` - --copyright "Copyright (C) 2024 Griefed" ` - --description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." ` - --dest "serverpackcreator-app\build\dist" ` - --icon "serverpackcreator-app\jpackagerResources\app.ico" ` - --input "serverpackcreator-app\build\jars" ` - --java-options "-Dfile.encoding=UTF-8" ` - --java-options "-Dlog4j2.formatMsgNoLookups=true" ` - --main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt ` - --main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar ` - --name ServerPackCreator ` - --resource-dir "serverpackcreator-app\jpackagerResources" ` - --runtime-image "${{ steps.java.outputs.path }}" ` - --temp "serverpackcreator-app\build\tmp\jpackager" ` - --type "app-image" ` - --vendor "griefed.de" ` - --verbose - - - name: List - run: dir serverpackcreator-app\build\dist - - - name: Archive - uses: thedoctor0/zip-release@0.7.1 - with: - type: 'zip' - directory: serverpackcreator-app/build/dist - path: 'ServerPackCreator' - filename: 'ServerPackCreator-Portable-Windows.zip' - - - name: Rename Archive - run: mv serverpackcreator-app/build/dist/ServerPackCreator-Portable-Windows.zip serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip - - - name: List - run: dir serverpackcreator-app\build\dist - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-02-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - # UPLOAD OS-SPECIFICS - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-02-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - ubuntu-01: - runs-on: ubuntu-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename - run: mv serverpackcreator-app/build/dist/serverpackcreator*.deb serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - ubuntu-02: + appimage: runs-on: ubuntu-latest needs: preparations steps: @@ -410,7 +153,7 @@ jobs: --input serverpackcreator-app/build/jars \ --java-options "-Dfile.encoding=UTF-8" \ --java-options "-Dlog4j2.formatMsgNoLookups=true" \ - --main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt \ + --main-class org.springframework.boot.loader.launch.JarLauncher \ --main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar \ --name ServerPackCreator \ --resource-dir serverpackcreator-app/jpackagerResources \ @@ -460,21 +203,11 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: ubuntu-02-release-artifacts + name: appimage-release path: | serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - # UPLOAD OS-SPECIFICS - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-02-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - prerelease: if: ${{ always() }} runs-on: ubuntu-latest @@ -529,27 +262,11 @@ jobs: - uses: actions/download-artifact@v4 with: - name: jar-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: mac-01-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: windows-01-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: windows-02-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: ubuntu-01-release-artifacts + name: jar-media-release - uses: actions/download-artifact@v4 with: - name: ubuntu-02-release-artifacts + name: appimage-release # GENERATE RELEASE - name: Create Release @@ -564,10 +281,13 @@ jobs: prerelease: true fail_on_unmatched_files: false files: | - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip + media/*.deb + media/*.rpm + media/*.dmg + media/*.sh + media/*.gz + media/*.exe + media/*.zip ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml index 8cb3599cd..8afb60adb 100644 --- a/.github/workflows/github_release.yml +++ b/.github/workflows/github_release.yml @@ -26,7 +26,7 @@ jobs: - name: Use tag run: echo ${{steps.tag.outputs.tag}} - jar: + jar-and-media: needs: preparations runs-on: ubuntu-latest @@ -52,20 +52,26 @@ jobs: with: gradle-version: wrapper + - uses: luangong/setup-install4j@v1 + with: + version: 10.0.7 + license: ${{ secrets.INSTALL4J_LICENSE }} + - name: Build release env: GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test + ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build media --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: build-artifacts + name: jar-media-build-artifacts path: | + media serverpackcreator-api/build serverpackcreator-app/build serverpackcreator-cli/build @@ -85,282 +91,20 @@ jobs: - uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: jar-release-artifacts + name: jar-media-release path: | + media/*.deb + media/*.rpm + media/*.dmg + media/*.sh + media/*.gz + media/*.exe + media/*.zip serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - mac-01: - runs-on: macos-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename MacOs - run: mv serverpackcreator-app/build/dist/ServerPackCreator*.pkg serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: mac-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Installer Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: mac-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - windows-01: - runs-on: windows-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Prepare wix-toolset - run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename Windows - run: mv serverpackcreator-app/build/dist/ServerPackCreator*.msi serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - windows-02: - runs-on: windows-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - id: java - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - cache: 'gradle' - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Prepare wix-toolset - run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - - - name: Prepare - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar :serverpackcreator-app:cleanTmpPackager --info --full-stacktrace - - - name: Build Image - run: | - jpackage ` - --app-version "${{ needs.preparations.outputs.version }}" ` - --copyright "Copyright (C) 2024 Griefed" ` - --description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." ` - --dest "serverpackcreator-app\build\dist" ` - --icon "serverpackcreator-app\jpackagerResources\app.ico" ` - --input "serverpackcreator-app\build\jars" ` - --java-options "-Dfile.encoding=UTF-8" ` - --java-options "-Dlog4j2.formatMsgNoLookups=true" ` - --main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt ` - --main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar ` - --name ServerPackCreator ` - --resource-dir "serverpackcreator-app\jpackagerResources" ` - --runtime-image "${{ steps.java.outputs.path }}" ` - --temp "serverpackcreator-app\build\tmp\jpackager" ` - --type "app-image" ` - --vendor "griefed.de" ` - --verbose - - - name: List - run: dir serverpackcreator-app\build\dist - - - name: Archive - uses: thedoctor0/zip-release@0.7.1 - with: - type: 'zip' - directory: serverpackcreator-app/build/dist - path: 'ServerPackCreator' - filename: 'ServerPackCreator-Portable-Windows.zip' - - - name: Rename Archive - run: mv serverpackcreator-app/build/dist/ServerPackCreator-Portable-Windows.zip serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip - - - name: List - run: dir serverpackcreator-app\build\dist - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-02-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - # UPLOAD OS-SPECIFICS - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: windows-02-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - ubuntu-01: - runs-on: ubuntu-latest - needs: preparations - steps: - # GET THE LATEST CODE - - name: Checkout latest code - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - # BUILD PROJECT AND PUBLISH - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - check-latest: true - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - - - name: Build installer - env: - GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace - ./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test - - - name: List After Build - run: ls serverpackcreator-app/build/dist/ - - - name: Rename - run: mv serverpackcreator-app/build/dist/serverpackcreator*.deb serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - - - name: Artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-01-release-artifacts - path: | - serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-01-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - ubuntu-02: + appimage: runs-on: ubuntu-latest needs: preparations steps: @@ -406,7 +150,7 @@ jobs: --input serverpackcreator-app/build/jars \ --java-options "-Dfile.encoding=UTF-8" \ --java-options "-Dlog4j2.formatMsgNoLookups=true" \ - --main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt \ + --main-class org.springframework.boot.loader.launch.JarLauncher \ --main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar \ --name ServerPackCreator \ --resource-dir serverpackcreator-app/jpackagerResources \ @@ -456,21 +200,11 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ always() }} with: - name: ubuntu-02-release-artifacts + name: appimage-release path: | serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - # UPLOAD OS-SPECIFICS - - name: Upload - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: ubuntu-02-installer-artifacts - path: | - serverpackcreator-app/build - if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - release: if: ${{ always() }} runs-on: ubuntu-latest @@ -524,27 +258,11 @@ jobs: - uses: actions/download-artifact@v4 with: - name: jar-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: mac-01-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: windows-01-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: windows-02-release-artifacts - - - uses: actions/download-artifact@v4 - with: - name: ubuntu-01-release-artifacts + name: jar-media-release - uses: actions/download-artifact@v4 with: - name: ubuntu-02-release-artifacts + name: appimage-release # GENERATE RELEASE - name: Create Release @@ -559,10 +277,13 @@ jobs: prerelease: false fail_on_unmatched_files: false files: | - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi - ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb - ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip + media/*.deb + media/*.rpm + media/*.dmg + media/*.sh + media/*.gz + media/*.exe + media/*.zip ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar