Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix towncrier build #1213

Merged
merged 4 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,19 @@ jobs:
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4
- name: Set up Python ${{ env.default-python }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.default-python }}
cache: "pip"
- name: Extract release tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create pull request branch
run: git switch -c "bump-changelog-for-${RELEASE_VERSION}"
- name: Install nox
run: python -m pip install nox
- name: Update changelog
run: pipx run towncrier build --yes --version $RELEASE_VERSION
run: nox --error-on-missing-interpreters --non-interactive --session build_changelog -- $RELEASE_VERSION
- name: Commit and push change
run: |
git config --global user.name 'github-actions[bot]'
Expand Down
6 changes: 6 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ def watch_docs(session: nox.Session) -> None:
upcoming_changelog.unlink(missing_ok=True)


@nox.session(python=PYTHON_DEFAULT_VERSION)
def build_changelog(session: nox.Session) -> None:
session.install(*DOC_DEPENDENCIES, ".")
session.run("towncrier", "build", "--version", session.posargs[0], "--yes")


@nox.session(python=PYTHON_DEFAULT_VERSION)
def build_man(session: nox.Session) -> None:
session.install(*MAN_DEPENDENCIES, ".")
Expand Down