diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 209d93b..a2180d3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,38 +1,17 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package +name: Build and publish python package on: - push: - branches: - - main - -permissions: - contents: read + release: + types: [published] jobs: - deploy: + publish-service-client-package: runs-on: ubuntu-latest - + permissions: + contents: write steps: - - uses: actions/checkout@v5 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Publish PyPi package + uses: cadifyai/poetry-publish@v0.1.0 with: - python-version: "3.13" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements/dev.txt - - name: Set PYPI token - run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} - - name: Build package - run: poetry build - - name: Publish package - run: poetry publish + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}