Skip to content

Publish Indexify to PyPI #56

Publish Indexify to PyPI

Publish Indexify to PyPI #56

name: Publish Indexify to PyPI
on:
workflow_dispatch:
inputs:
release_message:
type: string
description: Release message
required: true
prerelease:
type: boolean
description: Is this a pre-release version?
required: false
default: false
permissions:
contents: write
actions: write
packages: write
defaults:
run:
working-directory: ./indexify
jobs:
extract-version:
name: Extract Version Number
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version_extraction.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install toml
run: pip install toml
- id: version_extraction
run: echo "version=$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["poetry"]["version"])')" >> $GITHUB_OUTPUT
publish-indexify-to-pypi:
name: Publish Indexify package
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/indexify
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Poetry
run: pipx install --force 'poetry==2.0.0'
- name: Build python-sdk
run: make build
- name: Publish Indexify to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: indexify/dist/
publish-containers:
name: Publish Containers
needs:
- extract-version
- publish-indexify-to-pypi
uses: ./.github/workflows/publish_executor_containers.yaml
with:
indexify_version: ${{ needs.extract-version.outputs.version }}
secrets: inherit