Skip to content

workaround for maleformed javafx pom #69

workaround for maleformed javafx pom

workaround for maleformed javafx pom #69

name: Build
on:
[push]
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Extract version from tag and set it as project version
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
mvn versions:set --file pom.xml -DnewVersion=${GITHUB_REF##*/}
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Uploads the build artifact
uses: actions/upload-artifact@v4
with:
name: ${{runner.os}}.zip
path: target/reverseCharger-*.zip
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: Get version from tag and set up environment
run: echo "BUILD_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
discussion_category_name: releases
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
generate_release_notes: true
body: |-
:construction: Work in Progress
- name: Publish build artifacts on release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
reverseCharger-*.zip