Skip to content

Merge pull request #14 from gautierdag/callback-default #41

Merge pull request #14 from gautierdag/callback-default

Merge pull request #14 from gautierdag/callback-default #41

Workflow file for this run

name: Python Package Build and Publish
on:
push:
branches:
- main # Only run workflow for pushes to main branch
release:
types: [created] # Run workflow when a new release is created
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Checkout the repository content to GitHub Actions runner
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # Specify the Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Build source and wheel distribution
run: |
python setup.py sdist bdist_wheel
- name: Publish the distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}