build: Use Java and JavaFX 22 (#686) #71
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: Early Access | |
on: | |
push: | |
branches: [ master ] | |
env: | |
JAVAFX_VERSION: '22' | |
JAVA_VERSION: '22' | |
jobs: | |
precheck: | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.event.head_commit.message, 'Releasing version') != true | |
outputs: | |
JAVAFX_VERSION: ${{ env.JAVAFX_VERSION }} | |
JAVA_VERSION: ${{ env.JAVA_VERSION }} | |
APP_VERSION: ${{ steps.vars.outputs.APP_VERSION }} | |
PROJECT_VERSION: ${{ steps.vars.outputs.PROJECT_VERSION }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: oracle-actions/setup-java@v1 | |
with: | |
website: jdk.java.net | |
release: ${{ env.JAVA_VERSION }} | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set environment | |
id: vars | |
shell: bash | |
run: | | |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
APP_VERSION=$PROJECT_VERSION | |
APP_VERSION=${APP_VERSION%-*} | |
echo ::set-output name=APP_VERSION::$APP_VERSION | |
echo ::set-output name=PROJECT_VERSION::$PROJECT_VERSION | |
linux-bundles: | |
needs: [precheck] | |
uses: gluonhq/scenebuilder/.github/workflows/bundles-linux.yml@master | |
with: | |
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }} | |
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
app-version: ${{ needs.precheck.outputs.APP_VERSION }} | |
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }} | |
test: true | |
windows-bundles: | |
needs: [precheck] | |
uses: gluonhq/scenebuilder/.github/workflows/bundles-windows.yml@master | |
secrets: | |
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | |
WINDOWS_PASSWORD: ${{ secrets.WINDOWS_PASSWORD }} | |
WINDOWS_CERTNAME: ${{ secrets.WINDOWS_CERTNAME }} | |
with: | |
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }} | |
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
app-version: ${{ needs.precheck.outputs.APP_VERSION }} | |
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }} | |
test: true | |
mac-bundles: | |
needs: [precheck] | |
uses: gluonhq/scenebuilder/.github/workflows/bundles-mac.yml@master | |
secrets: | |
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} | |
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }} | |
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} | |
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} | |
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }} | |
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }} | |
with: | |
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }} | |
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
app-version: ${{ needs.precheck.outputs.APP_VERSION }} | |
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }} | |
test: true | |
mac_aarch64-bundles: | |
needs: [precheck] | |
uses: gluonhq/scenebuilder/.github/workflows/bundles-mac_aarch64.yml@master | |
secrets: | |
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} | |
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }} | |
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }} | |
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} | |
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }} | |
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }} | |
with: | |
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }} | |
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
app-version: ${{ needs.precheck.outputs.APP_VERSION }} | |
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }} | |
test: true | |
kit-bundles: | |
needs: [precheck] | |
uses: gluonhq/scenebuilder/.github/workflows/bundles-kit.yml@master | |
with: | |
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }} | |
early-access: | |
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, mac_aarch64-bundles, kit-bundles] | |
if: endsWith(${{ needs.precheck.outputs.PROJECT_VERSION }}, '-SNAPSHOT') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download all build artifacts | |
uses: actions/download-artifact@v2 | |
- name: Set up Java | |
uses: oracle-actions/setup-java@v1 | |
with: | |
website: jdk.java.net | |
release: ${{ needs.precheck.outputs.JAVA_VERSION }} | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Release with JReleaser | |
env: | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mvn -B -ntp -pl :parent -DartifactsDir=artifacts jreleaser:release | |
- name: JReleaser output | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: jreleaser-logs | |
path: | | |
target/jreleaser/trace.log | |
target/jreleaser/output.properties |