From 2e5de283998633e4a083e6885fcba01a84d73efd Mon Sep 17 00:00:00 2001 From: Logan Ward Date: Tue, 10 Jan 2023 11:59:20 -0500 Subject: [PATCH] Add a release script (#23) --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..d692e11 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Publish to PyPi + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: pypi-publish + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }}