Skip to content

Commit d1f8c2c

Browse files
Use towncrier to generate release notes (#548)
1 parent dcab2a1 commit d1f8c2c

File tree

11 files changed

+184
-131
lines changed

11 files changed

+184
-131
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,42 @@ jobs:
143143
uses: codecov/codecov-action@v1
144144
with:
145145
flags: mypy
146+
147+
check-changelog:
148+
name: Check for news fragments in 'changelog.d/'
149+
runs-on: ubuntu-latest
150+
151+
steps:
152+
- uses: actions/checkout@v2
153+
with:
154+
fetch-depth: 0
155+
156+
- name: Set up Python
157+
uses: actions/setup-python@v2
158+
with:
159+
python-version: '3.x'
160+
161+
- name: Get pip cache dir
162+
id: pip-cache
163+
run: |
164+
echo "::set-output name=dir::$(pip cache dir)"
165+
166+
- name: Cache
167+
uses: actions/cache@v2
168+
with:
169+
path: ${{ steps.pip-cache.outputs.dir }}
170+
key: pip-check-changelog-${{ hashFiles('**/setup.*') }}
171+
restore-keys: |
172+
pip-check-changelog-
173+
174+
- name: Install dependencies
175+
run: |
176+
python -m pip install --upgrade towncrier
177+
178+
- name: Run towncrier check
179+
run: |
180+
if ! towncrier check; then
181+
echo ''
182+
echo "Please add a description of your changes to 'changelog.d/{issue or PR number}.{feature,bugfix,removal}'"
183+
exit 1
184+
fi

0 commit comments

Comments
 (0)