From 9d4547d45eec9ad6a0c000a616fafc5dfe2dcdbd Mon Sep 17 00:00:00 2001 From: Mallory Wittwer Date: Wed, 15 Nov 2023 13:40:55 +0100 Subject: [PATCH] Add publish.yml --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f71797f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,28 @@ +# Build the package and publish it to PyPI on tag push. +name: Publish to PyPI +on: + push: + tags: + - "*" + +jobs: + publish: + name: publish + # needs: [tests] # require tests to pass before deploy runs + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Build package + run: | + python -m pip install -U pip build + python -m build + - name: Publish + uses: pypa/gh-action-pypi-publish@v1.5.0 + with: + user: __token__ + password: ${{ secrets.PYPI_KEY }} \ No newline at end of file