From 6619c4410e42cbd567febae7ea27ce8af487a87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Thu, 12 Dec 2024 14:31:57 +0100 Subject: [PATCH 1/5] Fix Java Gradle release --- .github/workflows/java-gradle-release.yaml | 2 +- actions/java-gradle-release/action.yaml | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 5ec07d742..23160cb08 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@fix/java-gradle-release 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..710e0f1d1 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -109,9 +109,11 @@ runs: 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.2 + 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" From e4cb52a90f64a53c999866d4f3cdcc7a571e73a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Thu, 12 Dec 2024 14:39:09 +0100 Subject: [PATCH 2/5] Fix Java Gradle release --- actions/java-gradle-release/action.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/actions/java-gradle-release/action.yaml b/actions/java-gradle-release/action.yaml index 710e0f1d1..632210a9f 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -55,7 +55,6 @@ runs: uses: bakdata/ci-templates/actions/checkout@1.50.2 with: fetch-depth: 0 - token: ${{ inputs.github-token }} - name: Setup git run: | @@ -92,15 +91,15 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} - - name: Create release - run: ./gradlew release -x test -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} -Prelease.disablePushToRemote=true -Prelease.requireBranch=${{ github.event.repository.default_branch }} ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} - shell: bash - working-directory: ${{ inputs.working-directory }} + # - name: Create release + # run: ./gradlew release -x test -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} -Prelease.disablePushToRemote=true -Prelease.requireBranch=${{ github.event.repository.default_branch }} ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} + # shell: bash + # working-directory: ${{ inputs.working-directory }} - - name: Push release tag - run: | - git push --tags origin - shell: bash + # - name: Push release tag + # run: | + # git push --tags origin + # shell: bash - name: Create changelog uses: bakdata/ci-templates/actions/changelog-generate@1.50.2 From 3312a382aa332e8c61b6408b18edb5856f4d81e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Thu, 12 Dec 2024 14:46:05 +0100 Subject: [PATCH 3/5] Fix Java Gradle release --- actions/java-gradle-release/action.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/java-gradle-release/action.yaml b/actions/java-gradle-release/action.yaml index 632210a9f..c0e5aad0f 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -54,7 +54,8 @@ runs: - name: Check out repository uses: bakdata/ci-templates/actions/checkout@1.50.2 with: - fetch-depth: 0 + fetch-depth: 0 # required for changelog generation + persist-credentials: false # required for pushing to protected branch later - name: Setup git run: | From b7f8da4291b3cdff093a6923ef45fe4379815244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Thu, 12 Dec 2024 14:49:07 +0100 Subject: [PATCH 4/5] Cleanup --- .github/workflows/java-gradle-release.yaml | 2 +- actions/java-gradle-release/action.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 23160cb08..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@fix/java-gradle-release + 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 c0e5aad0f..1402492e0 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -92,15 +92,15 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} - # - name: Create release - # run: ./gradlew release -x test -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} -Prelease.disablePushToRemote=true -Prelease.requireBranch=${{ github.event.repository.default_branch }} ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} - # shell: bash - # working-directory: ${{ inputs.working-directory }} + - name: Create release + run: ./gradlew release -x test -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} -Prelease.disablePushToRemote=true -Prelease.requireBranch=${{ github.event.repository.default_branch }} ${{ inputs.gradle-refresh-dependencies == 'true' && '--refresh-dependencies' || '' }} + shell: bash + working-directory: ${{ inputs.working-directory }} - # - name: Push release tag - # run: | - # git push --tags origin - # shell: bash + - name: Push release tag + run: | + git push --tags origin + shell: bash - name: Create changelog uses: bakdata/ci-templates/actions/changelog-generate@1.50.2 From d0fc8151c2e6a064c9e22c0c56aa05420c5f7308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Thu, 12 Dec 2024 16:00:07 +0100 Subject: [PATCH 5/5] Cleanup --- actions/java-gradle-release/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actions/java-gradle-release/action.yaml b/actions/java-gradle-release/action.yaml index 1402492e0..8945792d1 100644 --- a/actions/java-gradle-release/action.yaml +++ b/actions/java-gradle-release/action.yaml @@ -52,7 +52,7 @@ 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 # required for changelog generation persist-credentials: false # required for pushing to protected branch later @@ -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,14 +103,14 @@ 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 CHANGELOG.md file - uses: bakdata/ci-templates/actions/commit-and-push@1.50.2 + 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 }}