Skip to content

Commit

Permalink
fix: pypi release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivelin Ivanov authored Oct 4, 2021
1 parent 27d4431 commit b81b100
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
types: [created]

jobs:
deploy:
deploy-validate:
name: Validate deployment on Test.PyPi.org
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -19,11 +20,35 @@ jobs:
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
cp README.md src/
cd src
python setup.py sdist bdist_wheel
twine upload --verbose --repository testpypi dist/*
# twine upload dist/*
# twine upload dist/*
deploy-prod:
name: Deploy to PyPi.org
needs: [deploy-validate]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
cp README.md src/
cd src
python setup.py sdist bdist_wheel
twine --verbose upload dist/*

0 comments on commit b81b100

Please sign in to comment.