Skip to content

Commit

Permalink
Update upload_to_pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
oegedijk authored Mar 12, 2024
1 parent f9710a5 commit ec6d755
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/upload_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
name: Upload To Pypi

name: Publish to PyPI.org
on:
release:
types: [created]

types: [published]
jobs:
deploy:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- 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: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit ec6d755

Please sign in to comment.