CD - Release #23
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
name: CD - Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: "Build Release" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Setup Java JDK" | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: adopt | |
- id: vars | |
name: "Determine Tag Name" | |
run: | | |
VERSION_LINE=$(cat gradle.properties | grep "version=") | |
CURRENT_VERSION=${VERSION_LINE//version=/} | |
TAG_VERSION=v${CURRENT_VERSION//-SNAPSHOT/} | |
echo ::set-output name=tag::$TAG_VERSION | |
- name: "Prepare Git" | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "raynigon[bot]" | |
git checkout -b release | |
- name: "Publish Artifacts" | |
uses: eskatos/[email protected] #v1.3.3 | |
with: | |
arguments: ":release -Prelease.useAutomaticVersion=true build -x test" | |
wrapper-cache-enabled: true | |
dependencies-cache-enabled: true | |
env: | |
GITHUB_USERNAME: raynigon | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_KEY_PASSPHRASE }} | |
- name: Copy Assets | |
run: | | |
mkdir -p build/jars/ | |
cp ecs-logging-access/build/libs/*.jar build/jars/ | |
cp ecs-logging-app/build/libs/*.jar build/jars/ | |
cp ecs-logging-audit/build/libs/*.jar build/jars/ | |
cp ecs-logging-base/build/libs/*.jar build/jars/ | |
cp gzip-request-filter-starter/build/libs/*.jar build/jars/ | |
- id: content | |
name: Create Release Content | |
uses: raynigon/release-documentation@main | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
latest: "${{ steps.vars.outputs.tag }}" | |
template: | | |
# What's Changed | |
<!-- Features & Enhancements --> | |
{{#pull_requests.feature.length}} | |
## 🚀 Features & Enhancements | |
{{#pull_requests.feature }} | |
* {{ title }} PR: #{{ number }} | |
{{/pull_requests.feature }} | |
{{/pull_requests.feature.length}} | |
<!-- Bug Fixes --> | |
{{#pull_requests.bug.length}} | |
## 🐛 Bug Fixes | |
{{#pull_requests.bug}} | |
* {{ title }} PR: #{{ number }} | |
{{/pull_requests.bug}} | |
{{/pull_requests.bug.length}} | |
<!-- Documentation --> | |
{{#pull_requests.documentation.length}} | |
## 📖 Documentation | |
{{#pull_requests.documentation}} | |
* {{ title }} PR: #{{ number }} | |
{{/pull_requests.documentation}} | |
{{/pull_requests.documentation.length}} | |
<!-- Housekeeping --> | |
{{#pull_requests.housekeeping.length}} | |
## 🧹 Housekeeping | |
{{#pull_requests.housekeeping}} | |
* {{ title }} PR: #{{ number }} | |
{{/pull_requests.housekeeping}} | |
{{/pull_requests.housekeeping.length}} | |
<!-- Dependency updates --> | |
{{#pull_requests.dependencies.length}} | |
## 📦 Dependency updates | |
{{#pull_requests.dependencies}} | |
* {{ title }} PR: #{{ number }} | |
{{/pull_requests.dependencies}} | |
{{/pull_requests.dependencies.length}} | |
- name: "Github Release" | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 #v1 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
tag_name: "${{ steps.vars.outputs.tag }}" | |
name: "${{ steps.vars.outputs.tag }}" | |
files: build/libs/*.jar | |
body: ${{ steps.content.outputs.content }} |