Skip to content

Build and Attach Release JAR #4

Build and Attach Release JAR

Build and Attach Release JAR #4

Workflow file for this run

name: Build and Attach Release JAR
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
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 app.jar
- uses: softprops/action-gh-release@v1
with:
files: ${{ env.JAR_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}