From bbbf373b50f6c6ee806b8fb5225d0d70b96bbf95 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Wed, 23 Apr 2025 16:51:09 +0100 Subject: [PATCH] replaced env with correct boolean check (#407) --- .github/workflows/pr.yml | 3 --- .github/workflows/publish.yml | 12 +++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a5cde45..eb51a02 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -3,9 +3,6 @@ on: pull_request: branches: - "v3-dev" - push: - branches: - - "v3-dev" jobs: build-and-test: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 27c965e..0cecfa5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: branches: - "v3-dev" tags: - - "v3.*.*" + - "3.*.*" jobs: build-and-test: @@ -63,8 +63,6 @@ jobs: # set the environment based on what triggered the workflow environment: name: ${{ github.ref_type == 'tag' && 'pypi' || 'testpypi' }} - env: - IS_TAG_BUILD: ${{ github.ref_type == 'tag' }} permissions: id-token: write @@ -83,18 +81,18 @@ jobs: # Logic for TestPyPI (on v3-dev branch push) - name: "Publish to TestPyPI" - if: ${{ !env.IS_TAG_BUILD }} + if: ${{ !github.ref_type == 'tag' }} run: uv publish --index test - name: "Verify TestPyPI package installation" - if: ${{ !env.IS_TAG_BUILD }} + if: ${{ !github.ref_type == 'tag' }} run: uv run --index test --with specklepy --no-project -- python -c "import specklepy" # Logic for PyPI (on v3* tag creation) - name: "Publish to PyPI" - if: ${{ env.IS_TAG_BUILD }} + if: ${{ github.ref_type == 'tag' }} run: uv publish - name: "Verify PyPI package installation" - if: ${{ env.IS_TAG_BUILD }} + if: ${{ github.ref_type == 'tag' }} run: uv run --with specklepy --no-project -- python -c "import specklepy"