From d3e8ac3664001f5b11d8de0595e6d522c9d58ef1 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:19:49 +0100 Subject: [PATCH 1/9] Create maven.yml --- .github/workflows/maven.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..e5247f5 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,35 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - 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 + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 From 64caa09bea3fb55f1226e48949af8400215aefe3 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:25:14 +0100 Subject: [PATCH 2/9] Delete .github/workflows directory --- .github/workflows/maven.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index e5247f5..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Java CI with Maven - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - 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 - - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 From c517f99fe169927f6d0f84d0402cada239df9c71 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:25:35 +0100 Subject: [PATCH 3/9] Create maven.yml --- .github/workflows/maven.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..30af272 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,36 @@ +name: Java CI mit Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build mit Maven + run: mvn -B package --file pom.xml + + release: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Erstellen eines Releases + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false From a2da0a6f8ae687ca8f55b3ee769e638beacb1247 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:27:00 +0100 Subject: [PATCH 4/9] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 30af272..f9db0e1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,7 +15,7 @@ jobs: - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 17.0.8 - name: Build mit Maven run: mvn -B package --file pom.xml From 2b0d04fb1de50c37559766caa76ac4d03e9bdf28 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:33:05 +0100 Subject: [PATCH 5/9] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f9db0e1..56295d2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,7 +28,7 @@ jobs: id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: 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 with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} From cc4696ae1776e681692d5d3f14de5a0638663212 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:35:54 +0100 Subject: [PATCH 6/9] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 56295d2..9b1f51d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,7 +28,7 @@ jobs: id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: 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 + GITHUB_TOKEN: ${{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}} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} From 3215636a5240563c1a1dd00ae74636ca63ae4e25 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:36:47 +0100 Subject: [PATCH 7/9] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9b1f51d..ac286c1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,7 +28,7 @@ jobs: id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{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}} + GITHUB_TOKEN: ${{ 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 }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} From 7a0d50fa5af54abf788e084552abb466a9a853a9 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:40:56 +0100 Subject: [PATCH 8/9] Update maven.yml --- .github/workflows/maven.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ac286c1..22b5e21 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,23 +1,17 @@ -name: Java CI mit Maven +name: Automatisches Release on: push: - branches: [ main ] - pull_request: - branches: [ main ] + tags: + - 'v*' jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 17.0.8 - - name: Build mit Maven - run: mvn -B package --file pom.xml + - uses: actions/checkout@v2 + + # Weitere Build-Schritte hier... release: needs: build @@ -25,12 +19,13 @@ jobs: steps: - uses: actions/checkout@v2 - name: Erstellen eines Releases - id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ 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 }} + GITHUB_TOKEN: ${{ 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 }} with: + # Verwendet den Tag-Namen, der den Trigger ausgelöst hat, als Tag-Name für das Release tag_name: ${{ github.ref }} + # Erstellt einen Release-Namen, der dem Tag-Namen entspricht release_name: Release ${{ github.ref }} draft: false prerelease: false From e6a88620de9cef7a1d2aa0513dfdc3dc986d25d0 Mon Sep 17 00:00:00 2001 From: potzplitz <127513690+potzplitz@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:45:43 +0100 Subject: [PATCH 9/9] Updatedmaven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 22b5e21..90ecd99 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,7 +21,7 @@ jobs: - name: Erstellen eines Releases uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ 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 }} + GITHUB_TOKEN: ${{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}} with: # Verwendet den Tag-Namen, der den Trigger ausgelöst hat, als Tag-Name für das Release tag_name: ${{ github.ref }}