Update maven.yml

This commit is contained in:
potzplitz 2024-03-03 01:20:45 +01:00 committed by GitHub
parent a0fe90eea0
commit 9b285a1f75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,17 @@ jobs:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Configure Git User
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Create Git Tag
run: git tag $(date +'%Y%m%d%H%M%S') -a -m "Generated tag from GitHub Actions"
- name: Push Tags
run: git push --tags
- name: Build with Maven - name: Build with Maven
run: mvn clean install run: mvn clean install
@ -26,8 +37,8 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ env.RELEASE_VERSION }} # Stelle sicher, dass diese Umgebungsvariable deiner aktuellen Version entspricht tag_name: $(git describe --tags --abbrev=0)
release_name: Release ${{ env.RELEASE_VERSION }} release_name: Release $(git describe --tags --abbrev=0)
draft: false draft: false
prerelease: false prerelease: false