From a29674e401efa3c1edf9d05f4676d53f67e6ce6e 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 | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1f7713f..04d00e8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,17 +1,28 @@ -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 config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + poetry install + + - name: Publish package + run: poetry publish --build