Skip to content

Generate Release notes #5

Generate Release notes

Generate Release notes #5

name: Generate Release notes
on:
workflow_dispatch:
inputs:
milestoneNumber:
description: "Milestone title"
required: true
generatorVersion:
description: "Changelog Generator version"
required: true
jobs:
build:
name: Generate release notes
runs-on: ubuntu-latest
steps:
- name: Capture milestone number and generator version
run: |
echo MILESTONE_NUMBER=${{ github.event.inputs.milestoneNumber }} >> $GITHUB_ENV
echo GENERATOR_VERSION=${{ github.event.inputs.generatorVersion }} >> $GITHUB_ENV
- name: Download changelog generator
run: wget https://github.com/spring-io/github-changelog-generator/releases/download/v$GENERATOR_VERSION/github-changelog-generator.jar
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Prepare configuration file
run: |
cat << EOF > application.yml
changelog:
repository: spring-projects/spring-batch
sections:
- title: ":star: New features"
labels: [ "type: feature" ]
- title: ":rocket: Enhancements"
labels: [ "type: enhancement" ]
- title: ":lady_beetle: Bug fixes"
labels: [ "type: bug" ]
- title: ":notebook_with_decorative_cover: Documentation"
labels: [ "in: documentation" ]
- title: ":hammer: Tasks"
labels: [ "type: task" ]
EOF
- name: Generate release notes
run: java -jar github-changelog-generator.jar $MILESTONE_NUMBER release-notes.md
- name: Print release notes
run: cat release-notes.md