Skip to content
name: Publish Besca to PyPI # and Test PyPI
on:
release:
types: [created, published]
# Added 'published' because when you draft a release und publish, it never reaches the 'created' type
# https://stackoverflow.com/questions/59319281/github-action-different-between-release-created-and-published
workflow_dispatch:
jobs:
build-n-publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# - name: Publish distribution package to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/