diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index dfa5f87..71b1d3e 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -5,29 +5,29 @@ on: jobs: build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + name: Build and publish Python 🐍 distributions 📦 to PyPI runs-on: ubuntu-latest + environment: pypi + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write steps: - uses: actions/checkout@v5 with: ref: master - - name: Set up Python 3.12 - uses: actions/setup-python@v6 + + - name: Install the latest version of uv and set the python version + uses: astral-sh/setup-uv@v7 with: python-version: '3.12' + activate-environment: true - - name: Install setuptools - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools wheel twine + - name: Install Packages + run: uv sync --frozen - - name: Build a binary wheel and a source tarball - run: | - python setup.py sdist bdist_wheel + - name: Build package + run: uv build - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.pypi_api_key }}