diff options
| author | 2025-12-31 18:36:32 +0800 | |
|---|---|---|
| committer | 2025-12-31 18:36:32 +0800 | |
| commit | 2164059395e962b1715fe0d3f46d8fc9f076eaab (patch) | |
| tree | 08bd90125f6227ea6f5bcf3285d7180843a5d610 /.github | |
| parent | 3522b3efcc879a7238c6309ede2673f4bd75b27d (diff) | |
| download | base-model-2164059395e962b1715fe0d3f46d8fc9f076eaab.tar.gz base-model-2164059395e962b1715fe0d3f46d8fc9f076eaab.zip | |
fix: streamline TestPyPI publishing step in workflow
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/publish.yml | 38 |
1 files 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 |
