Skip to content

chore/minor_change_for_testing #51

chore/minor_change_for_testing

chore/minor_change_for_testing #51

name: generate-python-client
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: generatePythonClient
- name: Build with Poetry
working-directory: ./generated-python
run: poetry build
- name: Run Unit Tests
working-directory: ./generated-python
run: poetry install --with dev && poetry run pytest test/
- name: Publish package distributions to TestPyPI
if: github.ref == 'refs/heads/dev'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: generated-python/dist/
- name: Publish release package to PyPI
if: startsWith(github.ref, 'refs/heads/release')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: generated-python/dist/