Merge branch 'main' into build/medcat/CU-869ddh1jv-fix-test-model-upload #15
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: medcat-den release-build | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'medcat-den/v*.*.*' | ||
| permissions: | ||
| id-token: write | ||
| defaults: | ||
| run: | ||
| working-directory: ./medcat-den | ||
| jobs: | ||
| test-and-publish-to-PyPI: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout main | ||
| uses: actions/checkout@v6 | ||
| - name: Release Tag | ||
| # If GITHUB_REF=refs/tags/medcat-den/v0.1.2, this returns v0.1.2. Note it's including the "v" though it probably shouldnt | ||
| run: echo "RELEASE_VERSION=${GITHUB_REF##refs/*/}" >> $GITHUB_ENV | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install --upgrade build | ||
| - name: Install client package in development mode | ||
| run: | | ||
| pip install -e ".[dev]" | ||
| - name: Test | ||
| run: | | ||
| pytest tests | ||
| - name: Build client package | ||
| run: | | ||
| python -m build | ||
| - name: Publish production distribution to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages_dir: medcat-den/dist | ||
| # test-time models for download | ||
| upload-test-models: | ||
| runs-on: ubuntu-latest | ||
| needs: test-and-publish-to-PyPI | ||
| uses: ./.github/workflows/upload-test-models.yml | ||
| with: | ||
| tag: ${{ github.ref_name }} | ||