Skip to content

Commit 90d67bf

Browse files
committed
ci: Enable creation of release notes for non-release versions.
1 parent 0deb9d9 commit 90d67bf

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/main.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,27 @@ jobs:
128128

129129
prepare-release-notes:
130130
name: Prepare Release Notes
131-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
132131
runs-on: ubuntu-latest
133132
steps:
134133
- name: Checkout
135134
uses: actions/checkout@v4
135+
with:
136+
fetch-depth: 0
137+
- name: Install Python
138+
uses: actions/setup-python@v5
139+
- name: Install towncrier
140+
run: pip install towncrier==24.8.0
136141
- name: Install pandoc
137142
run: |
138143
sudo apt-get install -y pandoc
144+
- name: Compile Release Notes Draft
145+
if: ${{ !contains(github.ref, 'refs/tags/') }}
146+
run: |
147+
set -e
148+
version=$(python ./tools/get-version.py)
149+
towncrier build --draft --version "${version}" > release-notes.rst
139150
- name: Extract release notes from Git tag
151+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
140152
run: |
141153
set -e
142154
git for-each-ref github.ref --format='%(contents)' > release-notes.rst

0 commit comments

Comments
 (0)