Skip to content

Merge pull request #3 from small-thinking/add-gha #1

Merge pull request #3 from small-thinking/add-gha

Merge pull request #3 from small-thinking/add-gha #1

name: Publish Python Package to PyPI
# Trigger the workflow when a tag is pushed with a version starting with 'v'
on:
push:
tags:
- 'v*'
jobs:
build-and-publish:
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 setuptools wheel twine
# Step name: Build package
- name: Build package
run: |
python setup.py sdist bdist_wheel
# Step name: Publish to PyPI
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}