From 8dcdf5338e0f2af4d7b3731e8dfd163b1f0796dc Mon Sep 17 00:00:00 2001 From: Julien Maupetit Date: Fri, 14 Jun 2024 17:40:04 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7(client)=20add=20PyPI=20publication?= =?UTF-8?q?=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want the CLI to be easily installable. --- .github/workflows/python-packages.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/python-packages.yml diff --git a/.github/workflows/python-packages.yml b/.github/workflows/python-packages.yml new file mode 100644 index 00000000..57022326 --- /dev/null +++ b/.github/workflows/python-packages.yml @@ -0,0 +1,44 @@ +name: Publish python packages + +on: + release: + types: [published] + +jobs: + release-build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./src/client + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "poetry" + - name: Build release distributions + run: poetry build + - name: Upload dists + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./src/client + needs: + - release-build + permissions: + id-token: write + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 +