bundle the UI and update the readme #23
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: 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 |