Merge pull request #51 from chiruu12/feat/agentos-evals #30
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: Dev Release | |
| on: | |
| push: | |
| branches: [main] | |
| # Queue dev-release runs instead of cancelling the in-flight one. Each push gets | |
| # a unique BASE.devN version (N = commit count), so back-to-back merges can all | |
| # publish safely; cancelling mid-run only left orphaned "error"/inactive | |
| # deployment records that looked like failures. | |
| concurrency: | |
| group: dev-release | |
| cancel-in-progress: false | |
| jobs: | |
| publish-dev: | |
| name: Publish dev version to PyPI | |
| runs-on: ubuntu-latest | |
| environment: deployment | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run tests | |
| run: uv run pytest tests/ -x -q | |
| - name: Set dev version | |
| run: | | |
| BASE=$(python3 -c "import re; print(re.search(r'version\s*=\s*\"(.+?)\"', open('pyproject.toml').read()).group(1))") | |
| COMMITS=$(git rev-list --count HEAD) | |
| DEV_VERSION="${BASE}.dev${COMMITS}" | |
| echo "DEV_VERSION=${DEV_VERSION}" >> $GITHUB_ENV | |
| sed -i "s/version = \"${BASE}\"/version = \"${DEV_VERSION}\"/" pyproject.toml | |
| echo "Publishing ${DEV_VERSION}" | |
| - name: Build package | |
| run: uv build | |
| - name: Publish to PyPI | |
| run: uv publish --token "$PYPI_TOKEN" | |
| env: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |