From a972d3474d23408ffc437d7cb425ae50d258ed13 Mon Sep 17 00:00:00 2001 From: mart-r Date: Mon, 11 Aug 2025 21:11:38 +0100 Subject: [PATCH 1/2] Allow v1 production workflow upon releases --- .github/workflows/medcat-v1_production.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/medcat-v1_production.yml b/.github/workflows/medcat-v1_production.yml index e2f0a69ef..9365f37e1 100644 --- a/.github/workflows/medcat-v1_production.yml +++ b/.github/workflows/medcat-v1_production.yml @@ -6,8 +6,9 @@ on: push: branches: [ "medcat-v1/production", "medcat-v1/v[0-9]+.[0-9]+.post" ] - # release: - # types: [ published , edited ] + release: + types: [ published , edited ] + defaults: run: working-directory: ./medcat-v1 @@ -16,8 +17,10 @@ jobs: runs-on: ubuntu-24.04 concurrency: build-n-publish-to-pypi - if: | - github.repository == 'CogStack/cogstack-nlp' + if: | + github.repository == 'CogStack/cogstack-nlp' && + (github.event_name != 'release' || startsWith(github.event.release.tag_name, 'medcat-v1')) + steps: - name: Checkout production From 0bf5ff4cc0f8281e09810089d408040800573558 Mon Sep 17 00:00:00 2001 From: mart-r Date: Mon, 11 Aug 2025 21:13:00 +0100 Subject: [PATCH 2/2] Bump release version --- .github/workflows/medcat-v1_production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medcat-v1_production.yml b/.github/workflows/medcat-v1_production.yml index 9365f37e1..edb4c3b11 100644 --- a/.github/workflows/medcat-v1_production.yml +++ b/.github/workflows/medcat-v1_production.yml @@ -37,7 +37,7 @@ jobs: - name: Run UATs run: | python -m pip install --upgrade pip - export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MEDCAT="1.16.1" # NOTE: This is where the project verison is set + export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MEDCAT="1.16.3" # NOTE: This is where the project verison is set pip install -r requirements-dev.txt all_files=$(git ls-files | grep '^tests/.*\.py$' | grep -v '/__init__\.py$' | sed 's/\.py$//' | sed 's/\//./g') num_files=$(echo "$all_files" | wc -l) @@ -56,7 +56,7 @@ jobs: - name: Build a binary wheel and a source tarball run: >- - SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MEDCAT="1.16.1" + SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MEDCAT="1.16.3" python -m build --sdist