-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (41 loc) · 1.29 KB
/
make-release-notes.yaml
File metadata and controls
50 lines (41 loc) · 1.29 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
name: Make Release Notes
on:
workflow_call:
inputs:
tag:
type: string
required: true
description: "What tag to release"
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ inputs.tag }}"
- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: Setup node
uses: actions/setup-node@v3
- name: Yarn install
run: |
yarn install
- name: Get namespace
id: namespace
run: |
name="$(echo ${{ inputs.tag }} | sed -E 's/(.*)-v[[:digit:]]+.[[:digit:]]+.[[:digit:]]+/\1/g')"
echo "name=$name" >> $GITHUB_OUTPUT
- name: Generate release notes
env:
NAMESPACE: ${{ steps.namespace.outputs.name }}
run: |
export GIT_CLIFF_TAG_PATTERN="${NAMESPACE}-v[0-9]+\\.[0-9]+\\.[0-9]+\$"
yarn git-cliff -c ".cliff.toml" --include-path "$NAMESPACE/**" -o "RELEASE-NOTES.md" -s all -l
- uses: actions/upload-artifact@v4
with:
name: "${{ inputs.tag }}.release-notes"
path: RELEASE-NOTES.md