-
Notifications
You must be signed in to change notification settings - Fork 11
90 lines (78 loc) · 2.98 KB
/
release.yaml
File metadata and controls
90 lines (78 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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/*