Skip to content

Commit

Permalink
Update pypi_publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbhr committed Nov 23, 2024
1 parent 98b3ec5 commit b4a93ab
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: Upload Python Package

on:
# Trigger on release creation
release:
Expand All @@ -19,23 +17,21 @@ jobs:

# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v1
with:
python-version: '3.x'

# Step 3: Upgrade pip and install dependencies for building and publishing
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
# Step 4: Build the package
- name: Build the package
run: python -m build
pip install setuptools wheel twine
# Step 5: Publish to PyPI
- name: Publish to PyPI
# Step 4: Build and publish to PyPI
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} # Set in repository secrets
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} # Set in repository secrets
run: twine upload dist/*
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit b4a93ab

Please sign in to comment.