use non-fx jdk package to not confuse jlink #98
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
name: Java CI | |
on: | |
[push] | |
env: | |
APP_NAME: helloJavaFX | |
BUILD_VERSION: SNAPSHOT | |
jobs: | |
build: | |
name: Creates the executable Javafx test apps for different systems | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
outputs: | |
artifact-version: SNAPSHOT #${{ steps.setversion.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
java-package: jdk | |
cache: maven | |
- name: Ensure to use tagged version in build | |
shell: bash | |
if: startsWith(github.ref,'refs/tags/') | |
run: | | |
VERSION=${GITHUB_REF##*/} | |
mvn versions:set --file pom.xml -DnewVersion=${VERSION} | |
echo "BUILD_VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Build runnable app with Maven | |
run: mvn -B install --file pom.xml | |
- name: Uploads the zip for possible further use | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.APP_NAME }}-${{ env.BUILD_VERSION}}-${{ runner.os }} | |
path: target/helloJavaFX-*.[zt]* | |
release: | |
name: Draft a Release on GitHub Releases | |
runs-on: ubuntu-latest | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
BUILD_VERSION: DUMMY | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@v2 | |
- name: Create a release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generate_release_notes: true | |
tag_name: ${{ github.ref }} | |
body: | | |
:construction: Work in Progress | |
draft: true | |
prerelease: false | |
files: | | |
${{ env.APP_NAME }}-SNAPSHOT-Linux/helloJavaFX-${{ env.BUILD_VERSION }}-linux.tar.gz | |
${{ env.APP_NAME }}-SNAPSHOT-macOS/helloJavaFX-${{ env.BUILD_VERSION }}-mac.zip | |
${{ env.APP_NAME }}-SNAPSHOT-Windows/helloJavaFX-${{ env.BUILD_VERSION }}-win.zip |