From 1e1cd6baca97c463c24372770b8bb67f9d33957b Mon Sep 17 00:00:00 2001 From: IsaccBarker Date: Wed, 13 Nov 2024 00:53:13 -0700 Subject: [PATCH] [53] implement --- .github/workflows/publish.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..e3b6fcb --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,34 @@ +name: "Publish to PyPI" + +on: + release: + types: [published] + +jobs: + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: pip install . + + - name: Publish to PyPI + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: "${{ secrets.PYPI_API_KEY }}" + run: | + twine upload dist/*