Update maven.yml
This commit is contained in:
parent
9b285a1f75
commit
1ff93aa826
1 changed files with 12 additions and 11 deletions
23
.github/workflows/maven.yml
vendored
23
.github/workflows/maven.yml
vendored
|
@ -1,38 +1,39 @@
|
||||||
name: Build and Release Java Project
|
name: Build und Veröffentlichen des Java-Projekts
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # oder den Namen des Hauptbranchs Ihres Projekts
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout des Codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Setze JDK 17 ein
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Configure Git User
|
- name: Konfiguriere Git-Benutzer
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
git config --local user.name "GitHub Action"
|
git config --local user.name "GitHub Action"
|
||||||
|
|
||||||
- name: Create Git Tag
|
- name: Erstelle Git-Tag
|
||||||
run: git tag $(date +'%Y%m%d%H%M%S') -a -m "Generated tag from GitHub Actions"
|
run: git tag $(date +'%Y%m%d%H%M%S') -a -m "Generierter Tag von GitHub Actions"
|
||||||
|
|
||||||
- name: Push Tags
|
- name: Sende Tags
|
||||||
run: git push --tags
|
run: git push --tags
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Baue mit Maven
|
||||||
run: mvn clean install
|
run: mvn clean install
|
||||||
|
|
||||||
- name: Create Release
|
- name: Erstelle Release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -42,7 +43,7 @@ jobs:
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
- name: Upload Artifact to Release
|
- name: Lade Artefakt zur Veröffentlichung hoch
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue