-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.87 KB
/
release-notes.yml
File metadata and controls
53 lines (46 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Milestone Closure
on:
milestone:
types: [closed]
jobs:
create-release-notes:
runs-on: ubuntu-latest
outputs:
notes: ${{ steps.extract-version-and-notes.outputs.RELEASE_NOTES_FILE }}
version: ${{ steps.extract-version-and-notes.outputs.VERSION }}
date: ${{ steps.extract-version-and-notes.outputs.RELEASE_DATE }}
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: Set Release environment- and output-variables
id: extract-version-and-notes
run: |
RELEASE_NOTES_FILE=$(ls temp_release_notes/*.md | head -n 1)
echo "RELEASE_NOTES_FILE=$RELEASE_NOTES_FILE" >> $GITHUB_ENV
echo "RELEASE_NOTES_FILE=$RELEASE_NOTES_FILE" >> $GITHUB_OUTPUT
VERSION=$(echo ${{ github.event.milestone.title }} | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_DATE=$(date +'%b %d, %Y')" >> $GITHUB_OUTPUT
- name: Add Release Notes to cache
id: cache-notes
uses: actions/cache@v4
with:
path: ${{ env.RELEASE_NOTES_FILE }}
key: notes
- 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: Console Framework client v${{ env.VERSION }}
body_path: ${{ env.RELEASE_NOTES_FILE }}
draft: true