Workflow file for this run
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 | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python π distributions π¦ to TestPyPI | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python 3.7 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.7 | |
- name: Build sdist | |
run: python setup.py sdist | |
- name: Publish distribution π¦ to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true | |
- name: Install from test and test running | |
run: | | |
python -m pip install --upgrade pip | |
pip install --extra-index-url https://test.pypi.org/simple trading-calendars | |
python -c 'import trading_calendars;print(trading_calendars.__version__)' | |
pip uninstall -y trading-calendars | |
- name: Publish distribution π¦ to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} | |
- name: Install and test running | |
run: | | |
pip install trading-calendars | |
python -c 'import trading_calendars;print(trading_calendars.__version__)' |