Point to dev branch for testing #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: build | |
- name: Build with Poetry | |
working-directory: ./python-client | |
run: poetry build | |
- 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: python-client/dist/ | |
- name: Publish release package to PyPI | |
if: startsWith(github.ref, 'ref/heads/release') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: python-client/dist/ |