From d950b5a96d2158598eca5c6a4c5f6112649d41e1 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 16 Mar 2021 22:05:24 -0300 Subject: [PATCH] Allow to test wheels building with a label --- .github/workflows/publish.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7ffa5fe..1574cd8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,7 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI runs-on: ubuntu-latest + if: (github.repository == 'saimn/sigal' && (github.event_name == 'tags' || contains(github.event.pull_request.labels.*.name, 'Build wheels'))) steps: - uses: actions/checkout@master @@ -27,14 +28,8 @@ jobs: - name: Check long_description run: python -m twine check dist/* - - name: Publish distribution 📦 to Test PyPI + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ - - # - name: Publish distribution 📦 to PyPI - # if: startsWith(github.ref, 'refs/tags') - # uses: pypa/gh-action-pypi-publish@master - # with: - # password: ${{ secrets.pypi_password }} + password: ${{ secrets.pypi_password }}