From 6bc8dee1a00ebe77f4e6cd9a07df4bc2fbbaeadf Mon Sep 17 00:00:00 2001 From: T Date: Sat, 28 Sep 2024 20:16:48 +0800 Subject: [PATCH] Create publish_to_pypi.yml --- .github/workflows/publish_to_pypi.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish_to_pypi.yml diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml new file mode 100644 index 0000000..c4be858 --- /dev/null +++ b/.github/workflows/publish_to_pypi.yml @@ -0,0 +1,32 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file