From 3528234dfe6a6c56810824aa234a4a923bc52af2 Mon Sep 17 00:00:00 2001 From: Damian Czajkowski Date: Thu, 9 May 2024 19:10:05 +0200 Subject: [PATCH] Update CI/CD --- .github/workflows/deploy.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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 }}