Skip to content

Commit a2cce08

Browse files
committed
ci: Enable creation of release notes for non-release versions.
1 parent 3d89995 commit a2cce08

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/')
131+
needs: [lint]
132132
runs-on: ubuntu-latest
133133
steps:
134134
- name: Checkout
135135
uses: actions/checkout@v4
136+
with:
137+
fetch-depth: 0
138+
- name: Install Python
139+
uses: actions/setup-python@v5
140+
- name: Install towncrier
141+
run: pip install towncrier==24.8.0
136142
- name: Install pandoc
137143
run: |
138144
sudo apt-get install -y pandoc
145+
- name: Install pytest-asyncio
146+
run: pip install .
147+
- name: Compile Release Notes Draft
148+
if: ${{ !contains(github.ref, 'refs/tags/') }}
149+
run: towncrier build --draft --version "${{ needs.lint.outputs.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)