From d950b5a96d2158598eca5c6a4c5f6112649d41e1 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 16 Mar 2021 22:05:24 -0300 Subject: [PATCH 1/2] 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 }} From 87980d61a8ec29e5992dbec5fe4da5609e058bd4 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 16 Mar 2021 22:18:35 -0300 Subject: [PATCH 2/2] Add PR event --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1574cd8..94176b7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,7 @@ name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI on: + pull_request: push: tags: - '*'