Skip to content

Hotfix (removed broken rendering code) #55

Hotfix (removed broken rendering code)

Hotfix (removed broken rendering code) #55

name: Publish to PyPI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Check if Python package already exists
run: |
pip install PolyPhyPy==$(cat pyproject.toml | head -3 | tail -1 | cut -d '"' -f 2) && echo "true" > ./flag || echo "false" > ./flag
- name: Build and publish package
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
if grep -qF false ./flag; then
python3 -m pip install --upgrade build
python3 -m build
python3 -m pip install --upgrade twine
python3 -m twine upload dist/*
echo "New version is live!!!"
else
echo "Not publishing as the above version already exists!"
fi