chore: Remove test pypi publish #28
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 and TestPyPI | |
on: | |
pull_request_target: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
push: | |
tags: | |
- '**' | |
jobs: | |
deploy: | |
name: Build test and publish Python π distributions π¦ to PyPI and TestPyPI | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
pip install -r test-requirements.txt | |
- name: Install Pytest Annotate Failures | |
run: pip install pytest-github-actions-annotate-failures | |
- name: flake8 Lint | |
uses: py-actions/flake8@v1 | |
- name: Test | |
run: | | |
pytest --exitfirst --verbose --failed-first \ | |
--cov=powerpal --cov-report html | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish distribution π¦ to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish distribution π¦ to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |