From c6db1834c2bd08c5c951753d08ec5207c8e7e3fb Mon Sep 17 00:00:00 2001 From: Marco Mancini Date: Tue, 30 Jan 2024 17:13:13 +0100 Subject: [PATCH] Add github workflow to publish geolake client on PyPi --- .github/workflows/publish_on_pypi.yaml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish_on_pypi.yaml diff --git a/.github/workflows/publish_on_pypi.yaml b/.github/workflows/publish_on_pypi.yaml new file mode 100644 index 0000000..19bab74 --- /dev/null +++ b/.github/workflows/publish_on_pypi.yaml @@ -0,0 +1,32 @@ +name: Build geolake client and publish to PyPi + +on: + release: + types: [published] + workflow_dispatch: +jobs: + client-build-and-publish: + name: Build geolake client and publish to TestPyPI + strategy: + matrix: + python-version: ["3.11"] + os: [ubuntu-latest] + permissions: + id-token: write + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install build tool + working-directory: ./client + run: python3 -m pip install build --user . + - name: Build wheels + working-directory: ./client + run: python -m build --sdist --wheel --outdir=dist/ . + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./client/dist \ No newline at end of file