From d8cff407d20a0674d3b803f9ed4cee0063cf1c75 Mon Sep 17 00:00:00 2001 From: Robinson <45032111+RobinsonBeaucour@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:14:10 +0200 Subject: [PATCH] Create Pypi publish pipeline --- .github/workflows/python-publish.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..aef8b41 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,33 @@ +name: Python Package Publish + +on: + release: + types: [published] + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/poetry python - + export PATH="$PATH:$POETRY_HOME/bin" + + - name: Install dependencies + run: poetry install + + - name: Build and publish + env: + TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + poetry build + poetry config pypi-token.pypi $TOKEN + poetry publish -r pypi