diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3455395..da90df2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,38 +6,30 @@ on: - published jobs: - build-and-publish: + build-n-publish: name: Build and publish to PyPI runs-on: ubuntu-latest - environment: release - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Set up Python + - uses: actions/checkout@master + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: python-version: "3.12" - - name: Install pypa/build run: >- python -m pip install build --user - - name: Build a binary wheel and a source tarball run: >- - python -m - build + python -m build --sdist --wheel --outdir dist/ . - - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}