Skip to content

Commit

Permalink
Create buildOnRelease.yml
Browse files Browse the repository at this point in the history
Testing required
  • Loading branch information
tommyah authored Feb 4, 2026
1 parent c348a01 commit 5bc549d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/buildOnRelease.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 5bc549d

Please sign in to comment.