Test uploading to PyPI on release (#69)

This commit is contained in:
David Robertson 2021-11-23 15:13:39 +00:00 committed by GitHub
parent 84858af0ca
commit af3d6c8ab7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

26
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: "Build and upload to PyPI"
on:
release:
types: ["published"]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.6"
- name: "Install packaging tools"
run: "python -m pip install --upgrade build twine"
- name: "Build dist package"
run: "python -m build"
- name: "Upload to PyPI"
run: "python -m twine --repository testpypi upload dist/*"
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: "${{ secrets.TESTPYPI_API_TOKEN }}"