Files
chris.gitea 7b2a184dd4 build(distrib): add jdeploy packaging for native installers
Introduces native installer generation for Windows, macOS, and Linux
using jDeploy. The packaging is driven by package.json and a GitHub
Actions workflow that builds platform-specific bundles with embedded
Azul Zulu FX JRE 26.

Key additions:
- package.json descriptor with jDeploy configuration targeting 7
  platforms (excludes windows-arm64 due to missing Azul FX build)
- jdeploy-maven-plugin behind a profile to sync descriptor fields
  from POM without requiring Node in default builds
- GitHub workflow triggered by v* tags (versioned releases) or
  *-snapshot branches (rolling prereleases)
- Version-free finalName (pholio.jar) so jar path stays stable
- Launcher reads package-info.json from jdeploy tag for auto-update

The spring-boot-maven-plugin's mainClass is the single source of
truth for the entry point: it lands in the repackaged jar's manifest
as Start-Class, which jDeploy's native launcher uses to bootstrap.
2026-07-29 23:32:30 -04:00

65 lines
2.4 KiB
YAML

# Builds the native installers for Windows, macOS and Linux and publishes them as GitHub release assets.
#
# Two channels, distinguished by what was pushed:
# * a `v*` tag -> a versioned release; the tag name minus the leading `v` becomes the app version.
# * a `*-snapshot` branch -> a rolling prerelease named after the branch, replaced on every push.
#
# Auto-update needs nothing else from us. The jDeploy action writes a package-info.json to a `jdeploy` tag in
# this repository, and the native launcher installed on a user's machine reads it on startup to notice a newer
# release. That only works while the repository is public — a private repository needs a separate public
# release-only repository passed as `target_repository`.
name: jdeploy
on:
push:
tags:
- 'v*'
branches:
- '*-snapshot'
# Lets the pipeline be exercised without cutting a tag. Running it on a branch produces the snapshot
# prerelease for that branch, exactly as a push would.
workflow_dispatch:
# The action rewrites a shared `jdeploy` tag, so two runs must never overlap. Queued rather than cancelled:
# cancelling mid-upload is what leaves that tag half written.
concurrency:
group: jdeploy-release-${{ github.repository }}
cancel-in-progress: false
jobs:
bundle:
runs-on: ubuntu-latest
permissions:
# Needed to create the release and to push the `jdeploy` tag that carries package-info.json.
contents: write
steps:
- uses: actions/checkout@v4
# Zulu rather than Temurin: the JavaFX dependencies are pinned to a Zulu FX build locally, and Azul
# publishes non-LTS feature releases, which Java 26 is.
- name: Set up JDK 26
uses: actions/setup-java@v4
with:
java-version: '26'
distribution: 'zulu'
cache: maven
# The -Pjdeploy profile synchronises package.json by shelling out to `npm pkg set`, so Node has to be on
# PATH before Maven runs, not just before the jDeploy action.
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Build
run: ./mvnw -B --no-transfer-progress -Pjdeploy package
- name: Build app installer bundles
uses: shannah/jdeploy@v6.1.5
with:
github_token: ${{ github.token }}
# Kept in step with jdeploy.cli.version in pom.xml. The action's own default lags its release tag.
jdeploy_version: '6.1.5'