From 47cf0f3b1d5f4be082fbddbad9b945274eb4d6bb Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 7 Nov 2023 16:31:32 +0000 Subject: [PATCH] Show release draft as a step output. --- .github/workflows/ci.yml | 10 +++++++--- noxfile.py | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6546298e..a5467106 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,10 +160,12 @@ jobs: python-version: '3.11' task: - name: Check Newsfragment - nox: check_newsfragment + run: | + nox -e check_newsfragment + nox -e draft_newsfragment >> $GITHUB_STEP_SUMMARY run-if: ${{ github.head_ref != 'pre-commit-ci-update-config' }} - name: Check mypy - nox: typecheck + run: nox -e typecheck run-if: true steps: @@ -187,7 +189,9 @@ jobs: - uses: twisted/python-info-action@v1 - - run: nox -e ${{ matrix.task.nox }} + - name: Check + run: | + ${{ matrix.task.run }} if: ${{ matrix.task.run-if }} diff --git a/noxfile.py b/noxfile.py index bcd7f4ef..081817a7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -53,6 +53,11 @@ def check_newsfragment(session: nox.Session) -> None: session.install(".") session.run("python", "-m", "towncrier.check", "--compare-with", "origin/trunk") +@nox.session +def draft_newsfragment(session: nox.Session) -> None: + session.install(".") + session.run("python", "-m", "towncrier.build", "--draft") + @nox.session def typecheck(session: nox.Session) -> None: