Skip to content

Commit

Permalink
Merge pull request #36 from AxonFramework/automatic-release-notes
Browse files Browse the repository at this point in the history
Added automatic release notes on milestone closure
  • Loading branch information
smcvb committed Nov 6, 2020
2 parents 4f68359 + 3f007a8 commit 273754b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
releasenotes:
sections:
- title: "Features"
emoji: ":star:"
labels: [ "Type: Feature" ]
- title: "Enhancements"
emoji: ":chart_with_upwards_trend:"
labels: [ "Type: Enhancement" ]
- title: "Bug Fixes"
emoji: ":beetle:"
labels: [ "Type: Bug" ]
- title: "Dependency Upgrade"
emoji: ":hammer_and_wrench:"
labels: [ "Type: Dependency Upgrade" ]
issues:
exclude:
labels: [ "Type: Incorrect Repository", "Type: Question" ]
contributors:
exclude:
names: [ "dependabot" ]
33 changes: 33 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Trigger the workflow on milestone events
on:
milestone:
types: [closed]
name: Milestone Closure
jobs:
create-release-notes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release Notes Markdown
uses: docker://decathlon/release-notes-generator-action:2.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
OUTPUT_FOLDER: temp_release_notes
USE_MILESTONE_TITLE: "true"
- name: Get the name of the created Release Notes file and extract Version
run: |
RELEASE_NOTES_FILE=$(ls temp_release_notes/*.md | head -n 1)
echo "RELEASE_NOTES_FILE=$RELEASE_NOTES_FILE" >> $GITHUB_ENV
VERSION=$(echo ${{ github.event.milestone.title }} | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create a Draft Release Notes on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: axon-mongo-${{ env.VERSION }}
release_name: Axon Mongo Extension v${{ env.VERSION }}
body_path: ${{ env.RELEASE_NOTES_FILE }}
draft: true

0 comments on commit 273754b

Please sign in to comment.