2020-07-14 19:43:19 +02:00
|
|
|
name: Publish Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
2021-10-23 21:57:46 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-07-14 19:43:19 +02:00
|
|
|
jobs:
|
|
|
|
deploy-pypi:
|
|
|
|
name: Build and publish to PyPi
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-09 13:26:30 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-14 19:43:19 +02:00
|
|
|
- name: Set up Python
|
2022-03-09 13:25:56 +01:00
|
|
|
uses: actions/setup-python@v3
|
2020-07-14 19:43:19 +02:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Set up python environment
|
|
|
|
run: |
|
|
|
|
pip3 install -e .
|
|
|
|
pip3 install setuptools wheel twine
|
|
|
|
- name: Build
|
|
|
|
run: python setup.py sdist bdist_wheel
|
|
|
|
- name: Upload
|
|
|
|
env:
|
2020-08-23 01:41:40 +02:00
|
|
|
TWINE_USERNAME: __token__
|
|
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
2020-07-14 19:43:19 +02:00
|
|
|
run: twine upload dist/*
|