Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Merge pull request #1428 from LearningCircuit/fix/strict-security-workflows

LearningCircuitccd948ac8954
diff --cc .github/workflows/version_check.yml
index b4f16e294a,c92f671949..26a8316dff
--- a/.github/workflows/version_check.yml
+++ b/.github/workflows/version_check.yml
@@@ -36,59 -34,72 +36,60 @@@ jobs
- name: Checkout code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
- fetch-depth: 0
+ fetch-depth: 2
token: ${{ secrets.PAT_TOKEN }}
+ persist-credentials: false
- - name: Checkout PR branch
- env:
- HEAD_REF: ${{ github.head_ref }}
+ - name: Check if version was bumped in this push
+ id: check
run: |
- git checkout "${HEAD_REF}"
+ # Check if version changed in the commits being pushed
+ if git diff HEAD~1 -G"__version__" -- src/local_deep_research/__version__.py | grep -E '\+.*__version__.*='; then
+ echo "Version was manually bumped in this push"
+ echo "needs_bump=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "Version not bumped, will auto-bump"
+ echo "needs_bump=true" >> "$GITHUB_OUTPUT"
+ fi
- name: Set up Python
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
+ if: steps.check.outputs.needs_bump == 'true'
+ uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
- python-version: '3.12'
-
- - name: Check and auto-bump version
- if: "!contains(github.event.head_commit.message, 'chore: auto-bump version')"
- env:
- HEAD_REF: ${{ github.head_ref }}
- BASE_REF: ${{ github.base_ref }}
- run: |
- # Skip auto-bump for protected branches (dev, main) - these require PRs for changes
- if [[ "${HEAD_REF}" == "dev" || "${HEAD_REF}" == "main" ]]; then
- echo "::notice::Skipping auto-bump for protected branch '${HEAD_REF}'. Please bump version manually if needed."
- # Check if version was updated and inform
- if ! git diff "origin/${BASE_REF}..HEAD" -G"__version__" | grep -E '\+.*__version__.*='; then
- echo "::warning::Version was not updated in this PR. Consider bumping the version before merging."
- else
- echo "Version has been updated manually. No auto-bump needed."
- fi
- exit 0
- fi
+ python-version: '3.11'
- if ! git diff "origin/${BASE_REF}..HEAD" -G"__version__" | grep -E '\+.*__version__.*='; then
- echo "Version not updated. Auto-bumping patch version..."
-
- # Get current version
- current_version=$(grep -oP '(?<=__version__ = ")[^"]*' src/local_deep_research/__version__.py)
- echo "Current version: $current_version"
+ - name: Set up PDM with pdm-bump plugin
+ if: steps.check.outputs.needs_bump == 'true'
+ uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4
+ with:
+ python-version: '3.11'
- # Split version into parts
- IFS='.' read -ra VERSION_PARTS <<< "$current_version"
- major=${VERSION_PARTS[0]}
- minor=${VERSION_PARTS[1]}
- patch=${VERSION_PARTS[2]}
+ - name: Install pdm-bump plugin
+ if: steps.check.outputs.needs_bump == 'true'
+ run: |
+ pdm self add pdm-bump
- # Increment patch version
- new_patch=$((patch + 1))
- new_version="$major.$minor.$new_patch"
- echo "New version: $new_version"
+ - name: Auto-bump patch version
+ if: steps.check.outputs.needs_bump == 'true'
+ run: |
+ # Get current version before bump
+ current_version=$(pdm show --version 2>/dev/null || grep -oP '(?<=__version__ = ")[^"]*' src/local_deep_research/__version__.py)
+ echo "Current version: $current_version"
- # Update version file
- sed -i "s/__version__ = \"$current_version\"/__version__ = \"$new_version\"/" src/local_deep_research/__version__.py
+ # Bump patch version using pdm-bump
+ pdm bump patch
- # Configure git
- git config --local user.email "[email protected]"
- git config --local user.name "GitHub Action"
+ # Get new version after bump
+ new_version=$(pdm show --version 2>/dev/null || grep -oP '(?<=__version__ = ")[^"]*' src/local_deep_research/__version__.py)
+ echo "New version: $new_version"
- # Commit the version bump
- git add src/local_deep_research/__version__.py
- git commit -m "chore: auto-bump version to $new_version"
+ # Configure git
+ git config --local user.email "[email protected]"
+ git config --local user.name "GitHub Action"
- # Push to the PR branch
- git push origin "${HEAD_REF}"
+ # Commit and push
+ git add -A
+ git commit -m "chore: auto-bump version to $new_version"
+ git push
- echo "Version automatically bumped to $new_version"
- else
- echo "Version has been updated manually. No auto-bump needed."
- fi
+ echo "::notice::Version automatically bumped to $new_version"