|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI |
|
|
|
|
|
|
|
|
|
on: |
|
|
|
|
pull_request: |
|
|
|
|
push: |
|
|
|
|
tags: |
|
|
|
|
- '*' |
|
|
|
|
@ -9,6 +10,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 +29,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 }} |
|
|
|
|
|