Skip to content

Release

Release #27

Workflow file for this run

name: Release
on:
release:
types: [ published ]
repository_dispatch:
workflow_dispatch:
inputs:
upload_pypi:
description: 'upload to PyPI'
type: boolean
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
- name: Install requirements
run: pip install build setuptools twine -U
- name: Build package
run: |
python -m build --sdist
twine check dist/*
- name: Upload sdist to pypi
if: (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_KEY }}
run: |
python -m twine upload dist/*gz