build on push

This commit is contained in:
2024-10-22 20:31:02 +02:00
parent 603e4d3b0e
commit 3fe94deb55
2 changed files with 78 additions and 58 deletions
+19
View File
@@ -0,0 +1,19 @@
name: Build commit
on: [push]
jobs:
build-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
- name: Set short commit hash
run: fullCommit=${{ github.sha }} && echo "SHORT_SHA=${fullCommit:0:8}" >> $GITHUB_ENV
- name: Build with Maven
run: mvn -B clean package --file pom.xml -Drevision=${{ github.ref_name }}-${SHORT_SHA}