Skip to content

Merge pull request #142 from agentevals-dev/peterj/pluginmodelforsinks #36

Merge pull request #142 from agentevals-dev/peterj/pluginmodelforsinks

Merge pull request #142 from agentevals-dev/peterj/pluginmodelforsinks #36

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v0.1.0)'
required: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Set version from tag
run: uv version "${{ github.event.inputs.tag || github.ref_name }}" --package agentevals-cli
- name: Build core and bundled wheels
run: make release
- uses: actions/upload-artifact@v7
with:
name: wheels
path: |
dist/core/*.whl
dist/bundle/*.whl
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
cache-dependency-path: ui/package-lock.json
# Same bundle as `make release` / `build-bundle`: wheel must include ui/dist in src/agentevals/_static
# (see [tool.hatch.build] artifacts in pyproject.toml).
- name: Release Python package (wheel + sdist with bundled UI)
env:
VERSION: ${{ github.event.inputs.tag || github.ref_name }}
run: |
uv sync --package agentevals-cli --all-extras
uv version "$VERSION" --package agentevals-cli
make build-ui
rm -rf src/agentevals/_static
cp -r ui/dist src/agentevals/_static
rm -rf dist
uv build --package agentevals-cli
uv publish dist/* --token ${{ secrets.PYPI_TOKEN }}
rm -rf src/agentevals/_static
github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
name: wheels
path: dist/
- uses: softprops/action-gh-release@v2.5.0
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: dist/**/*.whl
generate_release_notes: true
push-docker:
needs: github-release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build and push
run: |
VERSION="${TAG#v}"
make build-docker \
DOCKER_REGISTRY="ghcr.io/${{ github.repository_owner }}" \
DOCKER_TAG="$VERSION"
env:
TAG: ${{ github.event.inputs.tag || github.ref_name }}
push-helm-chart:
needs: push-docker
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Helm chart to GHCR (OCI)
env:
TAG: ${{ github.event.inputs.tag || github.ref_name }}
HELM_REPO: oci://ghcr.io/${{ github.repository }}
run: |
export HELM_CHART_VERSION="${TAG#v}"
make helm-publish