Update maven.yml
This commit is contained in:
parent
73d6a24d56
commit
63bb257465
1 changed files with 29 additions and 12 deletions
41
.github/workflows/maven.yml
vendored
41
.github/workflows/maven.yml
vendored
|
@ -1,28 +1,45 @@
|
|||
name: Automatisches Release
|
||||
name: Java CI with Maven and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# Fügen Sie hier Ihre Build-Schritte ein...
|
||||
|
||||
release:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
- name: Update dependency graph
|
||||
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|
||||
|
||||
create_release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Erstellen eines Releases
|
||||
- uses: actions/checkout@v3
|
||||
- name: Generate tag
|
||||
id: tag
|
||||
run: echo "::set-output name=tag::$(date +'%Y%m%d%H%M%S')"
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.project_token }} # Ersetzen Sie GITHUB_PAT durch den Namen Ihres Secrets
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
release_name: Release ${{ github.ref_name }}
|
||||
tag_name: ${{ steps.tag.outputs.tag }}
|
||||
release_name: Release ${{ steps.tag.outputs.tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
|
Loading…
Reference in a new issue