From afc347c4ba2d31f74a0a3803072e122875965951 Mon Sep 17 00:00:00 2001 From: Ghislain Vieilledent Date: Tue, 19 Dec 2023 11:24:26 +1100 Subject: [PATCH] New condition for action and PyPI --- .github/workflows/wheel-pypi.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheel-pypi.yml b/.github/workflows/wheel-pypi.yml index dc7f3e9..4d4e657 100644 --- a/.github/workflows/wheel-pypi.yml +++ b/.github/workflows/wheel-pypi.yml @@ -7,14 +7,10 @@ name: Build wheel and upload to PyPI or TestPyPI # When push on branch dev on: push: - tags: - - "v*" - -env: - CONFIGURATIONS_FOLDER: .github/label-configuration-files - CONFIGURATIONS_ARTIFACT: label-configuration-files jobs: + # Only if tag for version + if: startsWith(github.ref, 'refs/tags/v') build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -50,7 +46,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: "3.11" + python-version: '3.11' - name: Install Python dependencies run: | python3 -m pip install --upgrade pip setuptools wheel @@ -63,7 +59,7 @@ jobs: upload_pypi: # Upload to PyPI for master branch - if: github.ref == "refs/heads/master" + if: github.ref == 'refs/heads/master' name: Upload to PyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest @@ -79,7 +75,7 @@ jobs: upload_testpypi: # Upload to TestPyPI for dev branch - if: github.ref == "refs/heads/dev" + if: github.ref == 'refs/heads/dev' name: Upload to TestPyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest