aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/publish.yml38
1 files changed, 30 insertions, 8 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 088f0fa..71fd1ea 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -71,14 +71,6 @@ 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
@@ -101,6 +93,36 @@ 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