From 5e5293e1242ef214caf3078d45090f1d3816ece0 Mon Sep 17 00:00:00 2001 From: crazyyanchao Date: Sat, 3 Aug 2024 16:39:13 +0800 Subject: [PATCH] update --- .github/workflows/python-publish.yml | 40 +++++++++++++++------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index a877b05..017af59 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -6,6 +6,8 @@ on: - 'v*.*.*' branches: - main + release: + types: [ published ] workflow_dispatch: jobs: @@ -13,26 +15,26 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine - - name: Build package - run: | - python setup.py sdist bdist_wheel + - name: Build package + run: | + python setup.py sdist bdist_wheel - - name: Publish package - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python -m twine upload dist/* + - name: Publish package + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python -m twine upload dist/*