-
-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (35 loc) · 1.58 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
name: Changelog
on:
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
check-for-updates:
name: Has been updated in this branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check file diff
run: |
set -euo pipefail
if !(git diff origin/main data/changelog.md | sed '6!d' | grep -Eq '^* **(Bug|Enhancement|New):**'); then
echo '
Please add a brief description of your change to the top of data/changelog.md.
See existing changes for formatting; accepted tags are "Bug", "Enhancement"
(minor change to an existing feature), and "New" (completely new feature).
Contributors are also encouraged to tag changelog entries with their GitHub
@username.
Changelog data will be shown on the landing page, in response to the
`changelog` command, and broadcast to Discord upon release.
This reminder can be ignored for changes with no user-facing impact, such as
dependency updates and refactors. Or not! It'"'"'s up to you, really.' >&2
exit 1
fi
- name: Generate release announcement preview
run: |
set -euo pipefail
changes="$(git diff origin/main data/changelog.md | awk '/^+[^+]/{ sub(/^[+ ]+/, ""); sub(/^\* /, "\n- "); printf "%s ", $0 }')"$'\n\n'"$(git diff --shortstat origin/main)"
echo "There's a new release on initiative.sh! Please allow ~5 minutes for the release to appear on production.$changes"