Skip to content

Merge pull request #97 from CenterForTheBuiltEnvironment/development #153

Merge pull request #97 from CenterForTheBuiltEnvironment/development

Merge pull request #97 from CenterForTheBuiltEnvironment/development #153

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Test and publish Python 🐍 distributions 📦 to PyPI
on:
push:
branches:
- master
jobs:
build:
# I am only testing with py310 but travis is Testing the other versions of Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Tox and any other packages
run: pip install "tox<4"
- name: Run Tox
run: |
tox -e py310
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 🐍
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Publish pythermalcomfort 📦 to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m twine upload dist/*.gz dist/*.whl