From ae35bd619947362654e099505e496fe0ed65ae17 Mon Sep 17 00:00:00 2001 From: Tommy Aas Hjelle Date: Wed, 4 Feb 2026 17:08:11 +0100 Subject: [PATCH 1/5] Rename main.yml to tests.yml --- .github/workflows/{main.yml => tests.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => tests.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/tests.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/tests.yml From c348a0145ec3a1c59ee435be98bad7bab6569e49 Mon Sep 17 00:00:00 2001 From: Tommy Aas Hjelle Date: Wed, 4 Feb 2026 17:08:23 +0100 Subject: [PATCH 2/5] Rename main.properties.json to tests.properties.json --- .github/workflows/{main.properties.json => tests.properties.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.properties.json => tests.properties.json} (100%) diff --git a/.github/workflows/main.properties.json b/.github/workflows/tests.properties.json similarity index 100% rename from .github/workflows/main.properties.json rename to .github/workflows/tests.properties.json From 5bc549d1ac6db04cee65a91bb7c68987da12f0df Mon Sep 17 00:00:00 2001 From: Tommy Aas Hjelle Date: Wed, 4 Feb 2026 17:09:23 +0100 Subject: [PATCH 3/5] Create buildOnRelease.yml Testing required --- .github/workflows/buildOnRelease.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/buildOnRelease.yml diff --git a/.github/workflows/buildOnRelease.yml b/.github/workflows/buildOnRelease.yml new file mode 100644 index 0000000..8252101 --- /dev/null +++ b/.github/workflows/buildOnRelease.yml @@ -0,0 +1,33 @@ +name: Build and Attach Release JAR + +on: + release: + types: [created] + workflow_dispatch: + +jobs: + build: + runs-on: [self-hosted, linux, x64] + + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + cache: maven + + - run: mvn clean package + + - name: Set versioned JAR name + run: echo "JAR_NAME=APPLICATION-${GITHUB_REF#refs/tags/}.jar" >> $GITHUB_ENV + + - name: Rename JAR + run: mv target/*.jar $JAR_NAME + + - uses: softprops/action-gh-release@v1 + with: + files: ${{ env.JAR_NAME }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 408608149a637cc23cf76e05e107231f4b0054ec Mon Sep 17 00:00:00 2001 From: Tommy Aas Hjelle Date: Wed, 4 Feb 2026 17:10:18 +0100 Subject: [PATCH 4/5] Create buildOnRelease.properties.json --- .github/workflows/buildOnRelease.properties.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/workflows/buildOnRelease.properties.json diff --git a/.github/workflows/buildOnRelease.properties.json b/.github/workflows/buildOnRelease.properties.json new file mode 100644 index 0000000..afd5762 --- /dev/null +++ b/.github/workflows/buildOnRelease.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Build project on release", + "description": "Builds and exports project as .jar file when a new github release is made", + "iconName": "maven", + "categories": ["Continuous integration", "Java", "Maven"] +} From 0e5909d1edf4cfb0cc8f7501bfa1a6dde2255037 Mon Sep 17 00:00:00 2001 From: Tommy Aas Hjelle Date: Wed, 4 Feb 2026 17:11:17 +0100 Subject: [PATCH 5/5] Fix: correct java version --- .github/workflows/buildOnRelease.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildOnRelease.yml b/.github/workflows/buildOnRelease.yml index 8252101..46443fa 100644 --- a/.github/workflows/buildOnRelease.yml +++ b/.github/workflows/buildOnRelease.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: [self-hosted, linux, x64] + runs-on: [self-hosted] steps: @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: '21' + java-version: '25' cache: maven - run: mvn clean package