Skip to content

Commit

Permalink
New condition for action and PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed Dec 19, 2023
1 parent efcb11c commit afc347c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/wheel-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit afc347c

Please sign in to comment.