44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: Release Python Packages
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'py@*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
skip_tests:
|
|
description: 'Skip running tests'
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish-core:
|
|
name: Build and release SDK
|
|
defaults:
|
|
run:
|
|
working-directory: ./python
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Setup Python with UV
|
|
uses: ./.github/actions/setup-python-uv
|
|
|
|
- name: Build Artifacts
|
|
run: |
|
|
make env
|
|
make build
|
|
|
|
- name: Publish Artifacts
|
|
if: github.event_name == 'push'
|
|
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
with:
|
|
packages-dir: ./python/dist
|
|
user: ${{ secrets.PYPI_USERNAME }}
|
|
password: ${{ secrets.PYPI_PASSWORD }}
|
|
skip-existing: true
|