From 164c175d4c1768f23c3755f759f7832841fb83c8 Mon Sep 17 00:00:00 2001 From: fredericjs <63259596+fredericjs@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:06:48 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..eb1a1c8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build and Upload to PyPI + +on: + push: + tags: + - 'v*' # Trigger on tags starting with 'v' + +jobs: + build-and-upload: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Upload to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload dist/*