Add Sandbox SDK on a unified httpx client (0.2.0) (#19) #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-n-publish: | |
| name: Build and publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write # PyPI trusted publishing (OIDC) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Check tag matches package version | |
| run: | | |
| pkg_version=$(grep -o '"[^"]*"' deepinfra/_version.py | tr -d '"') | |
| tag_version="${GITHUB_REF_NAME#v}" | |
| if [ "$pkg_version" != "$tag_version" ]; then | |
| echo "Tag $GITHUB_REF_NAME does not match _version.py ($pkg_version)" >&2 | |
| exit 1 | |
| fi | |
| - name: Build dist | |
| run: | | |
| python -m pip install --upgrade pip build | |
| python -m build | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |