Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added automatic release notes on milestone closure #36

Merged
merged 2 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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