Skip to content

feat(ci): update ci publish pipeline #1

feat(ci): update ci publish pipeline

feat(ci): update ci publish pipeline #1

name: python-sdk-ci
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup Dependencies
run: |
python -m pip install poetry
poetry install
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Build
run: poetry build
- name: Publish
if: startsWith(github.ref, 'refs/tags/')
run: poetry publish
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1