Skip to content

Added pres to output. #125

Added pres to output.

Added pres to output. #125

Workflow file for this run

# This file is based on the instructions in
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# The push to PyPI only happens for commits with a tag. This is done
# because PyPI and TestPyPI will not let you upload files with the
# same name as previous files. So, new files will only be accepted if
# the version number has increased.
name: Publish python distribution to PyPI
on: push
jobs:
build-and-publish:
name: Build and publish python distributions to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
# At some point we may want to distribute wheels, but for now just distribute the source and build separately on each machine.
#- name: Install wheel
# run: pip install wheel
- name: Build a source tarball
run: python3 setup.py sdist
#run: python3 setup.py sdist bdist_wheel
- name: Publish distribution to TestPyPI
#if: startsWith(github.ref, 'refs/tags')
if: "contains(github.event.head_commit.message, 'version bump')"
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_api_token }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
#if: startsWith(github.ref, 'refs/tags')
if: "contains(github.event.head_commit.message, 'version bump')"
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_api_token }}