From a94f567cd52232a09bb6ca89d4fd16187fd2e77d Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:07:08 +0100 Subject: [PATCH] add pypi pipeline --- .github/workflows/pypi.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pypi.yaml diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml new file mode 100644 index 00000000..8e044bdb --- /dev/null +++ b/.github/workflows/pypi.yaml @@ -0,0 +1,26 @@ +name: Upload package to PyPi + +on: + push: + release: + types: [published] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: ./.github/actions/prepare + with: + python-version: ${{ inputs.python-version }} + poetry-version: ${{ inputs.poetry-version }} + + - name: Build and publish + env: + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + poetry run python setup.py sdist bdist_wheel + pip install --upgrade dist/* + # twine upload dist/* --verbose --non-interactive --repository pypi -u __token__ -p $PYPI_API_TOKEN