Skip to content

Commit 77e4e35

Browse files
author
cheginit
committed
ENH: Remove the extra line breaks and improve the formating of the the release notes. Also, modify the workflow for manual triggering. [skip ci]
1 parent 78fdfb0 commit 77e4e35

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
name: Publish
2+
13
on:
24
push:
35
tags:
46
- 'v*'
5-
6-
name: Publish
7+
workflow_dispatch: # allows you to trigger manually
78

89
jobs:
910
changelog:
@@ -13,7 +14,8 @@ jobs:
1314
- uses: actions/checkout@v2.3.4
1415
- name: Generate Changelog
1516
run: |-
16-
echo "**Release Notes**" > ${{ github.workflow }}-CHANGELOG.rst
17+
echo "Release Notes" > ${{ github.workflow }}-CHANGELOG.rst
18+
echo "-------------" >> ${{ github.workflow }}-CHANGELOG.rst
1719
PAT="^---"
1820
L1=$(grep -n $PAT HISTORY.rst | sed -n 1p | cut -d ":" -f 1)
1921
L2=$(grep -n $PAT HISTORY.rst | sed -n 2p | cut -d ":" -f 1)
@@ -23,11 +25,12 @@ jobs:
2325
with:
2426
args: >-
2527
${{ github.workflow }}-CHANGELOG.rst
28+
--wrap=none
2629
-t markdown
2730
-o ${{ github.workflow }}-CHANGELOG.md
28-
- name: Remove extra newlines
31+
- name: Remove extra spaces
2932
run: |-
30-
sed -i -e :a -e '$!N;s/\n / /;ta' ${{ github.workflow }}-CHANGELOG.md
33+
sed -i 's/- /- /g' ${{ github.workflow }}-CHANGELOG.md
3134
- name: Github Release
3235
uses: softprops/action-gh-release@v1
3336
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)