From af3d6c8ab7b2e688a2102e7516f8197a01625756 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 23 Nov 2021 15:13:39 +0000 Subject: [PATCH] Test uploading to PyPI on release (#69) --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e9e461d --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}" \ No newline at end of file