Skip to content

Commit

Permalink
Fix Java Gradle release (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-roeder authored Dec 12, 2024
1 parent 7dbdf22 commit aa9b2ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
steps:
- name: Release on Github
id: release
uses: bakdata/ci-templates/actions/[email protected].2
uses: bakdata/ci-templates/actions/[email protected].3
with:
release-type: ${{ inputs.release-type }}
github-email: ${{ secrets.github-email }}
Expand Down
24 changes: 13 additions & 11 deletions actions/java-gradle-release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ runs:
using: "composite"
steps:
- name: Check out repository
uses: bakdata/ci-templates/actions/[email protected].2
uses: bakdata/ci-templates/actions/[email protected].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: |
Expand All @@ -71,7 +71,7 @@ runs:
working-directory: ${{ inputs.working-directory }}

- name: Set up Gradle with version ${{ inputs.gradle-version }}
uses: bakdata/ci-templates/actions/[email protected].2
uses: bakdata/ci-templates/actions/[email protected].3
with:
java-distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
Expand Down Expand Up @@ -103,15 +103,17 @@ runs:
shell: bash

- name: Create changelog
uses: bakdata/ci-templates/actions/[email protected].2
uses: bakdata/ci-templates/actions/[email protected].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/[email protected]
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"

0 comments on commit aa9b2ec

Please sign in to comment.