From aa9b2ec4eb9660a2d598395317f64ce50c60ec55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= <33963579+yannick-roeder@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:06:29 +0100 Subject: [PATCH] Fix Java Gradle release (#229) --- .github/workflows/java-gradle-release.yaml | 2 +- actions/java-gradle-release/action.yaml | 24 ++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 5ec07d742..c593bcfc8 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -68,7 +68,7 @@ jobs: steps: - name: Release on Github id: release - uses: bakdata/ci-templates/actions/java-gradle-release@1.50.2 + uses: bakdata/ci-templates/actions/java-gradle-release@1.50.3 with: release-type: ${{ inputs.release-type }} github-email: ${{ secrets.github-email }} diff --git a/actions/java-gradle-release/action.yaml b/actions/java-gradle-release/action.yaml index c718572ad..8945792d1 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -52,10 +52,10 @@ runs: using: "composite" steps: - name: Check out repository - uses: bakdata/ci-templates/actions/checkout@1.50.2 + uses: bakdata/ci-templates/actions/checkout@1.50.3 with: - fetch-depth: 0 - token: ${{ inputs.github-token }} + fetch-depth: 0 # required for changelog generation + persist-credentials: false # required for pushing to protected branch later - name: Setup git run: | @@ -71,7 +71,7 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Set up Gradle with version ${{ inputs.gradle-version }} - uses: bakdata/ci-templates/actions/java-gradle-setup@1.50.2 + uses: bakdata/ci-templates/actions/java-gradle-setup@1.50.3 with: java-distribution: ${{ inputs.java-distribution }} java-version: ${{ inputs.java-version }} @@ -103,15 +103,17 @@ runs: shell: bash - name: Create changelog - uses: bakdata/ci-templates/actions/changelog-generate@1.50.2 + uses: bakdata/ci-templates/actions/changelog-generate@1.50.3 with: github-token: ${{ inputs.github-token }} tag: ${{ steps.evaluate-version.outputs.release-version }} changelog-file: CHANGELOG.md - - name: Commit and push changes including the bump config file - run: | - git add CHANGELOG.md - git commit -m "Changelog for version ${{ steps.evaluate-version.outputs.release-version }}" - git push --follow-tags origin ${{ github.event.repository.default_branch }} - shell: bash + - name: Commit and push CHANGELOG.md file + uses: bakdata/ci-templates/actions/commit-and-push@1.50.3 + with: + commit-message: "Changelog for version ${{ steps.evaluate-version.outputs.release-version }}" + github-username: ${{ inputs.github-username }} + github-email: ${{ inputs.github-email }} + github-token: ${{ inputs.github-token }} + add-untracked: "true"