Skip to content

Merge pull request #182 from darrylmelander/lifecycle-doc #21

Merge pull request #182 from darrylmelander/lifecycle-doc

Merge pull request #182 from darrylmelander/lifecycle-doc #21

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 }}