diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b9da7af..9754218 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,13 +6,29 @@ jobs: pypi-publish: name: upload release to PyPI runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged environment: pypi permissions: - # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write + contents: read steps: - # retrieve your distributions here + - name: Checkout latest tag + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1