Skip to content

chore: Remove test pypi publish #28

chore: Remove test pypi publish

chore: Remove test pypi publish #28

Workflow file for this run

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 }}