Skip to content

Commit 7a0fede

Browse files
committed
Add Github Action to generate release notes
1 parent 8c8fc19 commit 7a0fede

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Generate Release notes
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
milestoneNumber:
7+
description: "Milestone title"
8+
required: true
9+
generatorVersion:
10+
description: "Changelog Generator version"
11+
required: true
12+
13+
jobs:
14+
build:
15+
name: Generate release notes
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Capture milestone number and generator version
19+
run: |
20+
echo MILESTONE_NUMBER=${{ github.event.inputs.milestoneNumber }} >> $GITHUB_ENV
21+
echo GENERATOR_VERSION=${{ github.event.inputs.generatorVersion }} >> $GITHUB_ENV
22+
23+
- name: Download changelog generator
24+
run: wget https://github.com/spring-io/github-changelog-generator/releases/download/v$GENERATOR_VERSION/github-changelog-generator.jar
25+
26+
- name: Set up JDK 17
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '17'
30+
distribution: 'temurin'
31+
32+
- name: Prepare configuration file
33+
run: |
34+
cat << EOF > application.yml
35+
changelog:
36+
repository: spring-projects/spring-batch
37+
sections:
38+
- title: ":star: New features"
39+
labels: [ "type: feature" ]
40+
- title: ":rocket: Enhancements"
41+
labels: [ "type: enhancement" ]
42+
- title: ":lady_beetle: Bug fixes"
43+
labels: [ "type: bug" ]
44+
- title: ":notebook_with_decorative_cover: Documentation"
45+
labels: [ "in: documentation" ]
46+
- title: ":hammer: Tasks"
47+
labels: [ "type: task" ]
48+
EOF
49+
50+
- name: Generate release notes
51+
run: java -jar github-changelog-generator.jar $MILESTONE_NUMBER release-notes.md
52+
53+
- name: Print release notes
54+
run: cat release-notes.md

0 commit comments

Comments
 (0)