Skip to content

Build and publish jpackage result to GitHub #109

Build and publish jpackage result to GitHub

Build and publish jpackage result to GitHub #109

Workflow file for this run

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 README.md README-MACOS.md README-FORMATS.md 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*.msi
build_name: win
# This is ARM64
- os: macos-14
artifact_name: ConvertWithMoss*.dmg
build_name: mac-arm
# This is x64
- os: macos-13
artifact_name: ConvertWithMoss*.dmg
build_name: mac-x64
name: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- 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