Skip to content

Commit

Permalink
Update build.yml with pypi API token
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed Feb 29, 2024
1 parent 7e86fff commit 2e6a552
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ jobs:
with:
name: python-package-distributions
path: dist/

- name: Upload to PyPI
env:
PYPI_PASSWORD: ${{ secrets.pypi_password }}
run: |
pip install twine;
python -m twine upload dist/* -u tommyod -p "$PYPI_PASSWORD" --skip-existing;

# https://github.com/pypa/gh-action-pypi-publish
- name: Publish Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@e53eb8b103ffcb59469888563dc324e3c8ba6f06
with:
skip-existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 2e6a552

Please sign in to comment.