Skip to content

Commit

Permalink
ci: ensure CHANGES.rst is always up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
autumnjolitz committed Jun 25, 2024
1 parent 073e5ba commit cab37cf
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,42 @@ jobs:
run: |
python/bin/python -m mypy instruct
update-changelog:
needs: [verify_style, verify_types]
runs-on: 'ubuntu-latest'
permissions:
contents: write
steps:
-
uses: actions/checkout@v4
-
name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
-
name: Setup
run: |
python -m pip install --upgrade pip invoke typing-extensions
invoke setup --devel --no-project
-
name: Update changelog
run: |
invoke update-changes
if ! git diff-index --quiet HEAD --
then
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
git add CHANGES.rst
git commit -m "docs: update CHANGES.rst"
invoke update-changes
git add CHANGES.rst
git commit --amend
git push
exit 253
fi
test_matrix:
needs: [verify_style, verify_types]
Expand Down Expand Up @@ -112,8 +148,9 @@ jobs:
run: |
python/bin/python -m pytest
pypi-publish:
needs: [test_matrix, verify_style]
needs: [test_matrix, verify_style, update-changelog]
runs-on: 'ubuntu-latest'
environment:
name: pypi
Expand Down

0 comments on commit cab37cf

Please sign in to comment.