Build and publish jpackage result to GitHub #42
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/ProjectConverter-Manual.pdf README.md | |
| - name: Publish result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ProjectConverter-Installers-Manual | |
| path: output/ProjectConverter-Manual.pdf | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # Important: build_name is used in the pom.xml and must match! | |
| - os: ubuntu-latest | |
| artifact_name: projectconverter*.deb | |
| build_name: linux | |
| - os: windows-latest | |
| artifact_name: ProjectConverter*.exe | |
| build_name: win | |
| # JDK25 not yet included (which can be fixed) but also JavaFX is not available for Windows on ARM | |
| #- os: windows-11-arm | |
| # artifact_name: ProjectConverter*.exe | |
| # build_name: win | |
| - os: macos-15 | |
| artifact_name: ProjectConverter*.dmg | |
| build_name: mac | |
| - os: macos-15-intel | |
| artifact_name: ProjectConverter*.dmg | |
| build_name: mac | |
| 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 | |
| - 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: ProjectConverter-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: ProjectConverter-Installers | |
| pattern: ProjectConverter-Installers-* | |
| separate-directories: true |