Build packages with jpackage #44
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
# This workflow will build a Java project with Gradle, then create an image with jpackage | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Build packages with jpackage | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: ubuntu-latest | |
type: deb | |
- platform: ubuntu-latest | |
container: fedora:latest | |
type: rpm | |
- platform: macos-latest | |
type: pkg | |
- platform: windows-latest | |
type: msi | |
container: ${{ matrix.container }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies (fedora) | |
if: matrix.container == 'fedora:latest' | |
run: | | |
dnf install -y binutils git rpm-build | |
git config --global --add safe.directory /__w/qupath/qupath | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Build with Gradle (Win/Mac/Linux deb) | |
if: matrix.container == '' | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: jpackage -P git-commit=true -P package=installer mergedJavadoc createChecksums -P toolchain=21 | |
- name: Build with Gradle (Linux rpm) | |
if: matrix.container == 'fedora:latest' | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: jpackage -P git-commit=true -P package=rpm mergedJavadoc createChecksums -P toolchain=21 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: jpackage-${{ matrix.type }} | |
path: build/dist | |
retention-days: 1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: javadoc-${{ matrix.type }} | |
path: build/docs/javadoc | |
retention-days: 1 |