Skip to content

Commit

Permalink
Remove unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKora committed Sep 21, 2023
1 parent daabd51 commit 4524ca4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 69 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/java-gradle-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
23 changes: 4 additions & 19 deletions actions/java-gradle-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,28 @@

This action releases Java Gradle artifacts by createing a tag on GitHub.

## Dependencies

This action uses the composite actions listed below:

- [checkout](https://github.com/bakdata/ci-templates/tree/1.32.0/actions/checkout)
- [java-gradle-setup](https://github.com/bakdata/ci-templates/tree/v1.16.0/actions/java-gradle-setup)
- [bump-version](https://github.com/bakdata/ci-templates/tree/1.32.0/actions/bump-version)
- [changelog-generate](https://github.com/bakdata/ci-templates/tree/1.33.0/actions/changelog-generate)
- [commit-and-push](https://github.com/bakdata/ci-templates/tree/1.32.0/actions/commit-and-push)

## Input Parameters

| Name | Required | Default Value | Type | Description |
| ----------------- | :------: | :-----------: | :-----: | ------------------------------------------------------------------------------------------------------------- |
| release-type || - | string | Scope of the release |
| github-email || - | string | GitHub email for requesting changes from API |
| github-username || - | string | GitHub username for requesting changes from API |
| github-token || - | string | GitHub token for requesting changes from API |
| changelog-file || 11 | string | Path to the changelog file |
| gradle-cache || true | boolean | Whether Gradle caching is enabled or not |
| gradle-version || wrapper | string | [Gradle version](https://github.com/gradle/gradle-build-action#use-a-specific-gradle-version) to be installed |
| java-distribution || microsoft | string | [Java distribution](https://github.com/actions/setup-java#supported-distributions) to be installed |
| java-version || 11 | string | Java version to be installed |
| gradle-version || wrapper | string | [Gradle version](https://github.com/gradle/gradle-build-action#use-a-specific-gradle-version) to be installed |
| gradle-cache || true | boolean | Whether Gradle caching is enabled or not |
| working-directory || "." | string | Working directory of your Gradle artifacts |

## Output Variables

| Name | Description |
| --------------- | ---------------------------------- |
| release-version | The bumped version of your release |

## Usage

```yaml
steps:
- name: Release on Github
uses: bakdata/ci-templates/actions/java-gradle-release@main
with:
release-type: "patch"
github-email: ${{ secrets.github-email }}
github-username: ${{ secrets.github-username }}
github-token: ${{ secrets.github-token }}
Expand Down
64 changes: 27 additions & 37 deletions actions/java-gradle-release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 4524ca4

Please sign in to comment.