used uv to build instead of pypi #8
This file contains 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-pypi | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository code | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache-dependency-path: pyproject.toml | |
# Install build dependencies | |
- name: Install build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install uv | |
# Build the distribution | |
- name: Build distribution | |
run: python -m uv build | |
# Publish to PyPI | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@v1.8.11 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" |