Skip to content

Instantly share code, notes, and snippets.

@yezz123
Created August 15, 2021 12:38
Show Gist options
  • Save yezz123/8a67e8910784f00b7530b3c3e00b7391 to your computer and use it in GitHub Desktop.
Save yezz123/8a67e8910784f00b7530b3c3e00b7391 to your computer and use it in GitHub Desktop.
name: Upload Python Package
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.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -Ur requirements.txt
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment