Skip to content

Merge pull request #185 from darrylmelander/fix-read-the-docs #22

Merge pull request #185 from darrylmelander/fix-read-the-docs

Merge pull request #185 from darrylmelander/fix-read-the-docs #22

name: Publish Python distributions to PyPI and TestPyPI
on:
push:
branches:
- main
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install gridx-prescient
run: |
python -m pip install --user --upgrade setuptools wheel
- name: Build a binary wheel and a source tarball
run: |
python3 setup.py sdist bdist_wheel
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}