Build and publish jpackage result to GitHub #180
This file contains hidden or 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: Build and publish jpackage result to GitHub | |
| on: | |
| push: | |
| branches: [ master ] | |
| # Necessary to manually run the workflow | |
| workflow_dispatch: | |
| jobs: | |
| createmanual: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure | |
| uses: actions/checkout@v4 | |
| - name: Create output folder | |
| run: | | |
| mkdir output # create output dir | |
| - name: Convert MD files to PDF | |
| uses: docker://pandoc/latex:2.9 | |
| with: | |
| args: --standalone --toc -V geometry:margin=2.5cm --number-sections --output=output/ConvertWithMoss-Manual.pdf documentation/README.md documentation/README-FORMATS.md documentation/CHANGELOG.md | |
| - name: Publish result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ConvertWithMoss-Installers-Manual | |
| path: output/ConvertWithMoss-Manual.pdf | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| artifact_name: convertwithmoss*.deb | |
| build_name: linux | |
| - os: windows-latest | |
| artifact_name: ConvertWithMoss*.exe | |
| build_name: win-x64 | |
| # JDK25 not yet included (which can be fixed) but also JavaFX is not available for Windows on ARM | |
| #- os: windows-11-arm | |
| # artifact_name: ConvertWithMoss*.exe | |
| # build_name: win-arm | |
| - os: macos-15 | |
| artifact_name: ConvertWithMoss*.dmg | |
| build_name: mac-arm | |
| - os: macos-15-intel | |
| artifact_name: ConvertWithMoss*.dmg | |
| build_name: mac-x64 | |
| name: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| # Temurin crashes with: Error: /usr/lib/jvm/temurin-25-jdk-amd64/lib/ct.sym has been modified | |
| # also there is no Windows ARM build | |
| # distribution: 'temurin' | |
| distribution: 'zulu' | |
| java-version: 25 | |
| # Zulu does not contain WiX Toolset (Temurin does)! | |
| - name: Install WiX Toolset | |
| if: startsWith(matrix.os, 'windows') | |
| run: choco install wixtoolset --no-progress -y | |
| - name: Build and jpackage with Maven | |
| run: mvn -B package jpackage::jpackage@${{ matrix.build_name }} --file pom.xml | |
| - name: Publish jpackage result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ConvertWithMoss-Installers-${{ matrix.os }} | |
| path: target/release/${{ matrix.artifact_name }} | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Merge Artifacts | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: ConvertWithMoss-Installers | |
| pattern: ConvertWithMoss-Installers-* | |
| separate-directories: true |