Skip to content

Instantly share code, notes, and snippets.

@mwakok
Created December 2, 2021 15:30
Show Gist options
  • Save mwakok/0841d69c469afc42731ba94c6976919a to your computer and use it in GitHub Desktop.
Save mwakok/0841d69c469afc42731ba94c6976919a to your computer and use it in GitHub Desktop.
Workflow to publish on PyPI
name: Publish PyPI
on:
release:
types: [published]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install wheel twine
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment