Skip to content

Commit

Permalink
gha: Try twine for testPyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Mar 21, 2021
1 parent 150b5e8 commit 0410b5d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build_wailord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Prep dependencies
run: poetry install
run: poetry add twine && poetry install
- name: Test project
run: poetry run pytest
- name: Build project
run: poetry build
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: poetry run twine upload --non-interactive -r testpypi dist/*
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: poetry run twine upload --non-interactive -r pypi dist/*

0 comments on commit 0410b5d

Please sign in to comment.