Merge pull request #6 from MF42-DZH/dev #14
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: Master Build with JPackage | |
on: | |
push: | |
branches: [ master ] | |
env: | |
pkg-assembly: 'GT4EngineGrapher.jar' | |
pkg-name: 'gt4enginegrapher' | |
pkg-version: '1.0.1' | |
jobs: | |
fat: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '21.0.2' | |
java-package: jdk | |
architecture: x64 | |
- name: Assemble Uberjar | |
run: sbt assembly | |
- name: Upload Uberjar | |
uses: actions/upload-artifact@v1 | |
with: | |
name: jars | |
path: "${{ env.pkg-assembly }}" | |
osx: | |
needs: fat | |
runs-on: [macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '21.0.2' | |
java-package: jdk | |
architecture: x64 | |
- name: Download fat jar | |
uses: actions/download-artifact@v1 | |
with: | |
name: jars | |
- name: Package jar as dmg installer | |
run: "jpackage --name ${{ env.pkg-name }} -i jars --main-class gt4enginegrapher.Main$ --main-jar ${{ env.pkg-assembly }} --app-version ${{ env.pkg-version }}" | |
- name: View artifacts | |
run: ls | |
- name: Upload dmg | |
uses: actions/upload-artifact@v1 | |
with: | |
name: dmgs | |
path: "${{ env.pkg-name }}-${{ env.pkg-version }}.dmg" | |
windows: | |
needs: fat | |
runs-on: [windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '21.0.2' | |
java-package: jdk | |
architecture: x64 | |
- name: Download fat jar | |
uses: actions/download-artifact@v1 | |
with: | |
name: jars | |
- name: Package jar as msi | |
run: "jpackage --name ${{ env.pkg-name }} --type msi -i jars --main-class gt4enginegrapher.Main$ --main-jar ${{ env.pkg-assembly }} --win-dir-chooser --app-version ${{ env.pkg-version }}" | |
- name: View artifacts | |
run: dir | |
- name: Upload installer | |
uses: actions/upload-artifact@v1 | |
with: | |
name: msis | |
path: "${{ env.pkg-name }}-${{ env.pkg-version }}.msi" | |
linux: | |
needs: fat | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '14.0.0' | |
java-package: jdk | |
architecture: x64 | |
- name: Download fat jar | |
uses: actions/download-artifact@v1 | |
with: | |
name: jars | |
- name: Package jar as debian package | |
run: "jpackage --name ${{ env.pkg-name }} --type deb -i jars --main-class gt4enginegrapher.Main$ --main-jar ${{ env.pkg-assembly }} --app-version ${{ env.pkg-version }}" | |
- name: View artifacts | |
run: ls | |
- name: Upload deb | |
uses: actions/upload-artifact@v1 | |
with: | |
name: debs | |
path: "${{ env.pkg-name }}_${{ env.pkg-version }}-1_amd64.deb" |