Skip to content

Commit

Permalink
[ci/cd] Publish Workflow for Python SDK (#1450)
Browse files Browse the repository at this point in the history
[ci/cd] Publish Workflow for Python SDK

title
  • Loading branch information
Ankush-lastmile authored Mar 13, 2024
2 parents c800c53 + d640b5f commit 266e083
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish_python_sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Build and publish the python-sdk to pypi. This workflow does NOT update the version number. Open a pr to update the version number and merge it to master before running this workflow.
# This workflow is triggered manually. see https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
name: Publish Python SDK to PyPI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10" # don't know what the impact of this is

- name: Build editor & client packages. # Otherwise the aiconfig local editor will have a blank screen. This gets included in the python package
run: |
cd python/src/aiconfig/editor/client && yarn && yarn build
- name: Build Package
run: |
pip install build && cd python && python -m build
pypi-publish:
runs-on: ubuntu-latest
needs:
- build-release
permissions:
id-token: write

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist/

0 comments on commit 266e083

Please sign in to comment.