-
-
Notifications
You must be signed in to change notification settings - Fork 23
73 lines (70 loc) · 2.53 KB
/
release-trigger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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-latest
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 }}