Reorder publish actions by order of importance in publish workflow

This commit is contained in:
Debanjum Singh Solanky 2022-08-04 04:40:35 +03:00
parent c3ae3cb021
commit 50575b283c

View file

@ -37,18 +37,27 @@ jobs:
run: |
pip install --upgrade .
- name: Build, Check App to Publish
run: |
rm -rf dist
python -m build
twine check dist/*
- name: Publish App to PyPI
- name: Publish Release to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
rm -rf dist
python -m build
twine check dist/*
twine upload dist/*
- name: Publish Master to PyPI
if: github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
sed -E -i "s/version=(.*)',/version=\1a$(date +%s)',/g" setup.py
rm -rf dist
python -m build
twine check dist/*
twine upload dist/*
- name: Publish PR to Test PyPI
@ -62,16 +71,4 @@ jobs:
rm -rf dist
python -m build
twine check dist/*
twine upload -r testpypi dist/*
- name: Publish Master to Test PyPI
if: github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
sed -E -i "s/version=(.*)',/version=\1a$(date +%s)',/g" setup.py
rm -rf dist
python -m build
twine check dist/*
twine upload dist/*
twine upload -r testpypi dist/*