Merge pull request #120 from agentevals-dev/chore/adk-v1-30-upgrade #30
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - 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 | |
| github-release: | |
| needs: build | |
| 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 | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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 | |
| push-docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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: Set appVersion in Chart.yaml | |
| run: | | |
| VERSION="${TAG#v}" | |
| sed -i "s/^appVersion:.*/appVersion: \"$VERSION\"/" charts/agentevals/Chart.yaml | |
| env: | |
| TAG: ${{ github.event.inputs.tag || github.ref_name }} | |
| - 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 }} |