Milestone Closure #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v4 | |
- name: Create Release Notes Markdown | |
uses: docker://decathlon/release-notes-generator-action:3.1.5 | |
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' ' -f6) | |
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: ${{ env.VERSION }} | |
release_name: Axon Server Connector for Java version ${{ env.VERSION }} | |
body_path: ${{ env.RELEASE_NOTES_FILE }} | |
draft: true |