-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daabd51
commit 4524ca4
Showing
3 changed files
with
42 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,17 +8,6 @@ on: | |
description: "Scope of the release (major, minor or patch)." | ||
required: true | ||
type: string | ||
|
||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
default: true | ||
type: boolean | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
type: string | ||
default: "wrapper" | ||
java-distribution: | ||
description: "Java distribution to be installed. (Default is microsoft)" | ||
required: false | ||
|
@@ -29,6 +18,16 @@ on: | |
required: false | ||
type: string | ||
default: "11" | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
type: string | ||
default: "wrapper" | ||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
type: boolean | ||
default: true | ||
working-directory: | ||
description: "Working directory of your Gradle artifacts. (Default is .)" | ||
required: false | ||
|
@@ -63,8 +62,7 @@ jobs: | |
steps: | ||
- name: Release on Github | ||
id: release | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
# uses: bakdata/ci-templates/actions/java-gradle-release@feat/changelog-def | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
release-type: ${{ inputs.release-type }} | ||
github-email: ${{ secrets.github-email }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,31 +2,18 @@ name: "Release Java artifacts" | |
description: "Release Java Gradle artifacts on Github" | ||
|
||
inputs: | ||
release-type: | ||
description: "Scope of the release" | ||
required: true | ||
github-email: | ||
description: "GitHub email for requesting changes from API." | ||
required: true | ||
github-token: | ||
description: "GitHub token for requesting changes from API." | ||
required: true | ||
github-username: | ||
description: "GitHub username for requesting changes from API." | ||
required: true | ||
release-type: | ||
description: "Scope of the release" | ||
github-token: | ||
description: "GitHub token for requesting changes from API." | ||
required: true | ||
|
||
changelog-file: | ||
description: "Path to the changelog file" | ||
required: false | ||
default: "CHANGELOG.md" | ||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
default: true | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
default: "wrapper" | ||
java-distribution: | ||
description: "Java distribution to be installed. (Default is microsoft)" | ||
required: false | ||
|
@@ -35,6 +22,14 @@ inputs: | |
description: "Java version to be installed. (Default is 11)" | ||
required: false | ||
default: "11" | ||
gradle-version: | ||
description: "Gradle version to be installed. (Default is wrapper)" | ||
required: false | ||
default: "wrapper" | ||
gradle-cache: | ||
description: "Whether Gradle caching is enabled or not. (Default is true)" | ||
required: false | ||
default: true | ||
working-directory: | ||
description: "Working directory of your Gradle artifacts. (Default is .)" | ||
required: false | ||
|
@@ -89,24 +84,19 @@ runs: | |
- name: Create release | ||
run: ./gradlew release -x test -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} -PdisablePushToRemote=true | ||
shell: bash | ||
working-directory: ${{ inputs.working-directory }} | ||
working-directory: ${{ inputs.working-directory }} | ||
|
||
- name: Create changelog | ||
id: build-changelog | ||
# uses: bakdata/ci-templates/actions/changelog-generate@feat/changelog-def | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
github-token: ${{ inputs.github-token }} | ||
new-tag: ${{ steps.evaluate-version.outputs.release-version }} | ||
changelog-file: "${{ inputs.changelog-file }}" | ||
fetch-reviewers: "true" | ||
fetch-release-information: "true" | ||
- name: Generate changelog | ||
run: ./gradlew -Pchangelog.releaseVersion=${{ steps.evaluate-version.outputs.release-version }} --stacktrace --info generateChangelog | ||
shell: bash | ||
working-directory: ${{ inputs.working-directory }} | ||
env: | ||
GITHUB_USER: ${{ inputs.github-username }} | ||
GITHUB_TOKEN: ${{ inputs.github-token }} | ||
|
||
- name: Commit and push changes including .bumpversion.cfg file | ||
uses: bakdata/ci-templates/actions/[email protected] | ||
with: | ||
ref: ${{ github.event.repository.default_branch }} | ||
commit-message: "Bump version ${{ steps.bump-version.outputs.old-version }} → ${{ steps.bump-version.outputs.release-version }}" | ||
github-username: ${{ inputs.github-username }} | ||
github-email: ${{ inputs.github-email }} | ||
github-token: ${{ inputs.github-token }} | ||
- name: Commit and push | ||
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 |