[pre-commit.ci] pre-commit autoupdate #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python π distributions π¦ to PyPI and TestPyPI | |
on: push | |
#on: | |
#push: | |
#branches: [master] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python π distributions π¦ to PyPI and TestPyPI | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install pep517 | |
run: >- | |
python -m | |
pip install | |
pep517 | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
pep517.build | |
--source | |
--binary | |
--out-dir dist/ | |
. | |
- name: Publish distribution π¦ to Test PyPI | |
env: | |
test_pypi_password: ${{ secrets.test_pypi_secret }} | |
if: env.test_pypi_password != null && endsWith(github.ref, 'master') && github.repository_owner == 'sintefneodroid' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.test_pypi_secret }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution π¦ to PyPI | |
env: | |
pypi_password: ${{ secrets.pypi_secret }} | |
if: env.pypi_password != null && startsWith(github.ref, 'refs/tags') && github.repository_owner == 'sintefneodroid' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_secret }} | |
#verbose: true | |
#skip_existing: true |