From 0face64c279f5412e441773ec9cea8734af2a0ac Mon Sep 17 00:00:00 2001 From: shenshuo <191715030@qq.com> Date: Fri, 7 Jun 2024 15:20:45 +0800 Subject: [PATCH] =?UTF-8?q?2024=E5=B9=B46=E6=9C=887=E6=97=A5=20=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=B8=8B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pypi.yml | 53 +++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index fecb56e..455b0e8 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,34 +1,39 @@ name: Publish Python 🐍 distributions 📦 to PyPI + on: push: - # schedule: - # - cron: '0 4 */1 * *' + branches: + - main + jobs: build: name: Publish Python 🐍 distributions 📦 to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install twine - run: >- - python -m - pip install - twine - --user - - name: Build a binary wheel and a source tarball - run: >- - python setup.py sdist - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@v2 - with: - user: __token__ - password: ${{ secrets.pypi_password }} - # repository_url: https://pypi.org/legacy/ + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install twine + + - name: Build distributions + run: | + python setup.py sdist bdist_wheel + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@v2 + with: + user: __token__ + password: ${{ secrets.pypi_password }} + # repository_url: https://pypi.org/legacy/ +