Release Trigger #32
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: Release Trigger | |
on: | |
workflow_dispatch: | |
inputs: | |
milestoneId: | |
description: 'Milestone ID' | |
required: true | |
default: '1' | |
releaseVersion: | |
description: 'Release version' | |
required: true | |
default: 'x.xx.x' | |
nextVersion: | |
description: 'Next version' | |
required: true | |
default: 'x.xx.x-SNAPSHOT' | |
env: | |
MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version" | |
jobs: | |
trigger-release: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'maven' | |
- name: Build | |
run: ./mvnw clean verify | |
- name: Create Release Notes | |
uses: docker://decathlon/release-notes-generator-action:3.1.5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT_FOLDER: .chglog/ | |
FILENAME: ${{ github.event.inputs.releaseVersion }} | |
- name: Setup git user | |
uses: fregante/setup-git-user@v2 | |
- name: Commit Release Notes | |
run: | | |
git add .chglog/*.md | |
git commit -m "[skip ci] Add release notes for version ${{ github.event.inputs.releaseVersion }}" | |
- name: Push Release Notes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.AM_PAT }} | |
branch: ${{ github.ref }} | |
- name: Set release version | |
run: ./mvnw versions:set -DnewVersion=${{ github.event.inputs.releaseVersion }} | |
- name: Commit release version | |
run: git add ./\*pom.xml && git commit -m "New Release Version ${{ github.event.inputs.releaseVersion }}" | |
- name: Add release tag | |
run: git tag -a -m "v${{ github.event.inputs.releaseVersion }}" v${{ github.event.inputs.releaseVersion }} | |
- name: Push release version | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.AM_PAT }} | |
branch: ${{ github.ref }} | |
- name: Set new snapshot version | |
run: ./mvnw versions:set -DnewVersion=${{ github.event.inputs.nextVersion }} | |
- name: Commit new snapshot version | |
run: git add ./\*pom.xml && git commit -m "Prepare Next Snapshot Version ${{ github.event.inputs.nextVersion }}" | |
- name: Push snapshot commit | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.AM_PAT }} | |
branch: ${{ github.ref }} |