feat: topic-aware classification (#47), type-specific thresholds (#48) #12
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: [develop] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| dev-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install build tools | |
| run: pip install build | |
| - name: Set dev version | |
| run: | | |
| # Read base version and bump patch for dev | |
| BASE_VERSION=$(grep 'version = ' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/') | |
| MAJOR=$(echo $BASE_VERSION | cut -d. -f1) | |
| MINOR=$(echo $BASE_VERSION | cut -d. -f2) | |
| PATCH=$(echo $BASE_VERSION | cut -d. -f3) | |
| NEXT_PATCH=$((PATCH + 1)) | |
| COMMIT_COUNT=$(git rev-list --count HEAD ^$(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~100) 2>/dev/null || echo 0) | |
| DEV_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}.dev${COMMIT_COUNT}" | |
| echo "DEV_VERSION=${DEV_VERSION}" >> $GITHUB_ENV | |
| # Patch pyproject.toml with dev version | |
| sed -i "s/version = \"${BASE_VERSION}\"/version = \"${DEV_VERSION}\"/" pyproject.toml | |
| echo "Building version: ${DEV_VERSION}" | |
| - run: python -m build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dev-dist | |
| path: dist/ | |
| pypi-dev-publish: | |
| needs: dev-build | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: dev-dist | |
| path: dist/ | |
| - name: Publish dev release to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |