From 114867fe1604eeb4d725f6c4029fc10326185192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro?= Date: Mon, 11 Mar 2024 20:34:10 -0300 Subject: [PATCH] testing new publish action --- .github/workflows/publish.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1f7713f..24094dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,17 +1,29 @@ -name: Build and publish python package +name: Publish to PyPI on: release: - types: [ published ] + types: + - created jobs: - publish-service-client-package: + publish: + name: Publish package to PyPI runs-on: ubuntu-latest - permissions: - contents: write steps: - - name: Publish PyPi package - uses: code-specialist/pypi-poetry-publish@v1 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v2 with: - ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }} + python-version: 3.11 + + - name: Install dependencies + run: | + pip install poetry + poetry install + + - name: Publish package + run: | + poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} + poetry publish --build