Skip to content

Commit

Permalink
add python sdk publish ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gofenix committed Aug 11, 2023
1 parent 59f6293 commit 9e0f505
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/python-sdk-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Run Python SDK Publish"

on:
workflow_dispatch:
push:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: ./.github/actions/python-setup
with:
pyproject_directory: ./ecosystem/python/sdk

- name: Build project for distribution
run: poetry build
working-directory: ./ecosystem/python/sdk

- name: Check Version
id: check-version
run: |
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $(grep $(poetry version --short) CHANGELOG.md) =~ $(poetry version --short) ]] || echo prerelease=true >> $GITHUB_OUTPUT
working-directory: ./ecosystem/python/sdk

- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
working-directory: ./ecosystem/python/sdk

0 comments on commit 9e0f505

Please sign in to comment.