From 2164059395e962b1715fe0d3f46d8fc9f076eaab Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 31 Dec 2025 18:36:32 +0800 Subject: fix: streamline TestPyPI publishing step in workflow --- .github/workflows/publish.yml | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 71fd1ea..088f0fa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -71,6 +71,14 @@ jobs: uv pip install twine uv run twine check dist/* + - name: Publish to TestPyPI + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} + run: | + uv run twine upload --repository testpypi --skip-existing --verbose dist/* + - uses: actions/upload-artifact@v4 with: name: dist @@ -93,36 +101,6 @@ jobs: name: model-zip path: model.zip - publish-testpypi: - name: Publish to TestPyPI - needs: build - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - - environment: - name: test-pypi - url: https://test.pypi.org/p/${{ github.sha }}/ - - steps: - - name: Download dist - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Publish to TestPyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} - run: | - uv pip install twine - uv run twine upload --repository testpypi --skip-existing --verbose dist/* - publish-pypi: name: Publish to PyPI needs: build -- cgit v1.2.3-70-g09d2