Skip to content

Commit 818dd1c

Browse files
committed
Add release changelog
1 parent b4d00c4 commit 818dd1c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
workflow_dispatch:
1919
inputs:
2020
revision:
21-
description: "The tag to release, e.g. v1.00"
21+
description: "A tag to release, e.g. v1.00"
2222
type: string
2323
required: false
2424

@@ -119,8 +119,10 @@ jobs:
119119
env:
120120
GITHUB_TOKEN: ${{ github.token }}
121121
SLUG: ${{ needs.build.outputs.slug }}
122-
run: |
123-
gh release create "$SLUG" --repo '${{ github.repository }}'
122+
run: >-
123+
cat CHANGELOG.md |
124+
python -c 'import os,re,sys; t=sys.stdin.read(); r=re.search(f"""(^## {os.environ["SLUG"][1:].replace(".", "\\.")} .*?)(?=^## \\d|\\Z)""", t, re.MULTILINE | re.DOTALL); print(r.group(0) if r else "")' |
125+
gh release create "$SLUG" --repo '${{ github.repository }}' --notes-file -
124126
- name: Upload release artifact
125127
env:
126128
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)