-
Notifications
You must be signed in to change notification settings - Fork 413
50 lines (44 loc) · 1.45 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Changelog
on:
push:
branches:
- main
pull_request:
# Important that we run on `labeled` and `unlabeled` to pick up `changelog/no-changelog` being added/removed
# DEV: [opened, reopened, synchronize] is the default
types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review]
jobs:
validate:
name: Validate changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Include all history and tags
with:
fetch-depth: 0
# Ensure a new reno release note was added in this PR.
# Use `reno new <slug>` to add a new note to `releasenotes/notes`,
# or add `changelog/no-changelog` label if no release note is needed.
- name: Ensure release note added
# Only run this on pull requests
if: github.event_name == 'pull_request'
run: scripts/check-releasenotes
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
- name: Install Dependencies
run: pip install reno docutils
- name: Lint changelog notes
run: reno lint
- name: Generate changelog
run: |
reno report | tee CHANGELOG.rst
rst2html.py CHANGELOG.rst CHANGELOG.html
- name: Upload CHANGELOG.rst
uses: actions/upload-artifact@v4
with:
name: changelog
path: |
CHANGELOG.rst
CHANGELOG.html