Skip to content

Release

Release #33

Workflow file for this run

name: Release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.GALILEO_AUTOMATION_GITHUB_TOKEN || github.token }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup UV
uses: astral-sh/setup-uv@v4
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
git_committer_name: galileo-automation
git_committer_email: ci@rungalileo.io
github_token: ${{ secrets.GALILEO_AUTOMATION_GITHUB_TOKEN || github.token }}
ssh_public_signing_key: ${{ secrets.GALILEO_AUTOMATION_SSH_PUBLIC_KEY }}
ssh_private_signing_key: ${{ secrets.GALILEO_AUTOMATION_SSH_PRIVATE_KEY }}
root_options: "-vv"
- name: Build Packages
if: steps.release.outputs.released == 'true'
run: |
uv sync
uv run python scripts/build.py all
# Publish in dependency order: models -> evaluators -> sdk -> evaluator-galileo
- name: Publish agent-control-models to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: models/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish agent-control-evaluators to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: evaluators/builtin/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish agent-control-sdk to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: sdks/python/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish agent-control-evaluator-galileo to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: evaluators/contrib/galileo/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload to GitHub Release
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: ${{ secrets.GALILEO_AUTOMATION_GITHUB_TOKEN || github.token }}
tag: ${{ steps.release.outputs.tag }}
root_options: "-vv"
dist_glob: |
models/dist/*
evaluators/builtin/dist/*
sdks/python/dist/*
server/dist/*
evaluators/contrib/galileo/dist/*