-
Notifications
You must be signed in to change notification settings - Fork 305
60 lines (53 loc) · 1.93 KB
/
release-notes.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
name: "Release Notes automation"
on:
workflow_dispatch:
inputs:
target_branch:
type: string
default: 'master'
description: Target branch
required: true
starting_commit:
type: string
description: Commit from which to start generating the release notes
required: true
jobs:
main:
name: Generate Release Notes
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.target_branch }}
fetch-depth: '0'
- name: Get version
id: get-version
uses: JActions/maven-version@v1.0.1
with:
pom: ./kura/pom.xml
- name: Download git-changelog-command-line tool
id: download-changelog-cli
uses: clausnz/github-action-download-maven-artifact@master
with:
url: 'https://repo1.maven.org'
repository: 'maven2'
groupId: 'se.bjurr.gitchangelog'
artifactId: 'git-changelog-command-line'
version: '1.100.2'
extension: 'jar'
- name: Generate Release Notes
run: |
java -jar ${{ steps.download-changelog-cli.outputs.file }} \
-fc "${{ github.event.inputs.starting_commit }}" \
-ex "{\"version\":\"${{ steps.get-version.outputs.version }}\"}" \
-t .github/release_notes_template/template.hbs \
-hhf .github/release_notes_template/helper.hbs \
-of kura/distrib/RELEASE_NOTES.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "chore: add Kura ${{ steps.get-version.outputs.version }} release notes"
commit-message: "chore: add Kura ${{ steps.get-version.outputs.version }} release notes"
body: "Automated changes by _Release Notes automation_ action: add Kura ${{ steps.get-version.outputs.version }} version release notes"
branch-suffix: short-commit-hash