Skip to content

Tokenize parsing

Tokenize parsing #414

Workflow file for this run

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"