From f8a4b0eb7d4d0068d4f0be14ba92b1b02c56fe4b Mon Sep 17 00:00:00 2001 From: Marvin Klar Date: Sat, 6 Jul 2024 14:30:53 +0200 Subject: [PATCH 1/3] Update maven compiler plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7978e6c..2ff407a 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.13.0 22 22 From e43572d7a8506ecbc203029b7195e23ccf7b6069 Mon Sep 17 00:00:00 2001 From: Marvin Klar Date: Sat, 6 Jul 2024 14:31:13 +0200 Subject: [PATCH 2/3] Specify non project version thats also used for the installer --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2ff407a..da91d20 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ link.bios-marcel baka - 0.1-SNAPSHOT + 0.1.0 baka @@ -130,7 +130,6 @@ 1.6.5 Baka - 1.0.0 link.biosmarcel target/dist ${mainModule}/${mainClass} From fffcba37c221997380a36f3b91a3c20b86ced239 Mon Sep 17 00:00:00 2001 From: Marvin Klar Date: Sat, 6 Jul 2024 14:31:31 +0200 Subject: [PATCH 3/3] Add github build and release workflow --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4449c82 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +on: push + +jobs: + test-and-build: + strategy: + matrix: + include: + - platform: windows-latest + binary_name: Baka-*.exe + output_name: Baka.exe + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '22' + distribution: 'adopt' + + - name: Build artifact + shell: bash + run: | + ./mvnw compile javafx:jlink jpackage:jpackage + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.output_name }} + path: ./target/dist/${{ matrix.binary_name }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..be01182 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Publish release + +on: + workflow_run: + workflows: [Build] + branches: [v**] + types: [completed] + +jobs: + publish-release: + runs-on: ubuntu-latest + # Kinda bad since it might release on any branch starting with v, but it'll do for now. + # Tag filtering in "on:" doesn't work, since the inital build trigger gets lost. + # github.ref is therefore also being reset to "refs/head/master". + if: ${{ github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Download windows artifact + uses: dawidd6/action-download-artifact@v3 + with: + workflow: build.yml + name: Baka.exe + + - name: Create release + uses: softprops/action-gh-release@v1 + with: + name: ${{ github.event.workflow_run.head_branch }} + tag_name: ${{ github.event.workflow_run.head_branch }} + files: | + Baka.exe \ No newline at end of file