From 27a4dbadbea396eb0f2c03a36a19d0112418f1e9 Mon Sep 17 00:00:00 2001 From: Matt Speck <20689127+mjspeck@users.noreply.github.com> Date: Sat, 26 Apr 2025 01:03:34 -0400 Subject: [PATCH] ci: added ci step to validate pylume version --- .github/workflows/publish-pylume.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/publish-pylume.yml b/.github/workflows/publish-pylume.yml index dddde233..c5bd4f6f 100644 --- a/.github/workflows/publish-pylume.yml +++ b/.github/workflows/publish-pylume.yml @@ -54,6 +54,21 @@ jobs: echo "VERSION=$VERSION" echo "version=$VERSION" >> $GITHUB_OUTPUT + validate-version: + runs-on: macos-latest + needs: determine-version + steps: + - uses: actions/checkout@v4 + - name: Validate version + id: validate-version + run: | + CODE_VERSION=$(grep '__version__' libs/pylume/pylume/__init__.py | cut -d'"' -f2) + if [ "${{ needs.determine-version.outputs.version }}" != "$CODE_VERSION" ]; then + echo "Version mismatch: expected $CODE_VERSION, got ${{ needs.determine-version.outputs.version }}" + exit 1 + fi + echo "Version validated: $CODE_VERSION" + publish: needs: determine-version uses: ./.github/workflows/reusable-publish.yml