Skip to content

Workflow file for this run

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__)'