From ce4ff7fd11c4b42ac972469f34857dc2f1f37314 Mon Sep 17 00:00:00 2001 From: Michael Overmeyer Date: Mon, 16 Oct 2023 10:17:09 -0400 Subject: [PATCH] Move pyproject.toml version check into pre-release sanity check That way, we can manually test the release pipeline without code changes. --- .github/workflows/publish.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 65a3990..4eee218 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,14 +54,6 @@ jobs: run: | echo "backports_version=`grep -Po 'version = "\K[^"]*' pyproject.toml`" >> $GITHUB_ENV - - name: Log all the things - run: | - echo 'version in pyproject.toml `${{ env.backports_version }}`' - - - name: Verify that the release version matches the version in pyproject.toml - run: | - [[ ${{ env.version_from_release_tag }} == ${{ env.backports_version }} ]] - - name: Generate the next developmental release version # If there is a developmental release in Test PyPI for the requested version, increment the number. Else 1. Save in $GITHUB_ENV run: | @@ -281,6 +273,14 @@ jobs: run: | [[ ${{ env.test_pypi_developmental_release_version }} != 0.0.0 ]] + - name: Get the version from pyproject.toml + run: | + echo "backports_version=`grep -Po 'version = "\K[^"]*' pyproject.toml`" >> $GITHUB_ENV + + - name: Verify that the release version matches the version in pyproject.toml + run: | + [[ ${{ env.version_from_release_tag }} == ${{ env.backports_version }} ]] + - name: Verify that the `version_from_release_tag` is present in the CHANGELOG # TODO: Use something like `changelog-cli` to extract the correct version number run: |