Skip to content

Commit

Permalink
add pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tae898 committed Apr 5, 2024
1 parent 3f9ba16 commit 03ba327
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Python Package to PyPI

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Create .pypirc file
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
echo "[pypi]" >> ~/.pypirc
echo "username = __token__" >> ~/.pypirc
echo "password = $PYPI_PASSWORD" >> ~/.pypirc
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 03ba327

Please sign in to comment.