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.

feat: add manual minor/major release triggers to version bump workflow (#2219)

LearningCircuit6968dc664640
diff --git a/.github/workflows/version_check.yml b/.github/workflows/version_check.yml
index ff4c943fa7..3a69a48a60 100644
--- a/.github/workflows/version_check.yml
+++ b/.github/workflows/version_check.yml
@@ -7,6 +7,9 @@ name: Version Auto-Bump
# - No version merge conflicts between parallel PRs
# - Version bumps are visible and reviewable
# - Uses fixed branch name to avoid clutter
+#
+# Manual dispatch supports minor/major bumps via the Actions tab dropdown.
+# Auto-triggered runs (push to main) always bump patch.
on:
push:
branches:
@@ -19,6 +22,16 @@ on:
- 'package-lock.json'
- 'Dockerfile'
workflow_dispatch:
+ inputs:
+ release_type:
+ description: 'Version bump type'
+ required: true
+ type: choice
+ options:
+ - patch
+ - minor
+ - major
+ default: 'patch'
permissions: {}
@@ -42,8 +55,20 @@ jobs:
fetch-depth: 2
persist-credentials: false
+ - name: Determine release type
+ id: release
+ run: |
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
+ release_type="${{ inputs.release_type }}"
+ else
+ release_type="patch"
+ fi
+ echo "type=$release_type" >> "$GITHUB_OUTPUT"
+ echo "Release type: $release_type"
+
- name: Check if version was bumped in this push
id: check
+ if: github.event_name != 'workflow_dispatch'
run: |
# 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
@@ -55,33 +80,36 @@ jobs:
fi
- name: Set up Python
- if: steps.check.outputs.needs_bump == 'true'
+ if: steps.check.outputs.needs_bump != 'false'
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
- name: Set up PDM with pdm-bump plugin
- if: steps.check.outputs.needs_bump == 'true'
+ if: steps.check.outputs.needs_bump != 'false'
uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4
with:
python-version: '3.11'
- name: Install pdm-bump plugin
- if: steps.check.outputs.needs_bump == 'true'
+ if: steps.check.outputs.needs_bump != 'false'
run: |
pdm self add pdm-bump
- - name: Bump patch version
- if: steps.check.outputs.needs_bump == 'true'
+ - name: Bump version
+ if: steps.check.outputs.needs_bump != 'false'
id: bump
run: |
+ release_type="${{ steps.release.outputs.type }}"
+
# Get current version before bump (prefer pdm, fallback to grep)
current_version=$(pdm show --version 2>/dev/null || grep -oP '(?<=__version__ = ")[^"]*' src/local_deep_research/__version__.py)
echo "Current version: $current_version"
echo "current_version=$current_version" >> "$GITHUB_OUTPUT"
- # Bump patch version using pdm-bump
- pdm bump patch
+ # Bump version using pdm-bump
+ echo "Bumping $release_type version..."
+ pdm bump "$release_type"
# Get new version after bump (prefer pdm, fallback to grep)
new_version=$(pdm show --version 2>/dev/null || grep -oP '(?<=__version__ = ")[^"]*' src/local_deep_research/__version__.py)
@@ -93,23 +121,53 @@ jobs:
mv package.json.tmp package.json
echo "Updated package.json version to $new_version"
+ - name: Generate PR body
+ if: steps.check.outputs.needs_bump != 'false'
+ id: pr_body
+ run: |
+ release_type="${{ steps.release.outputs.type }}"
+ current="${{ steps.bump.outputs.current_version }}"
+ new="${{ steps.bump.outputs.new_version }}"
+
+ body_file=$(mktemp)
+
+ {
+ echo "## Summary"
+ echo "- Bump **${release_type}** version: ${current} → ${new}"
+ echo ""
+
+ if [ "$release_type" = "major" ]; then
+ echo "> [!CAUTION]"
+ echo "> This is a **major** version bump. It signals breaking changes."
+ echo "> Please review carefully before merging."
+ elif [ "$release_type" = "minor" ]; then
+ echo "> [!IMPORTANT]"
+ echo "> This is a **minor** version bump, indicating new features or significant changes."
+ fi
+
+ echo ""
+ if [ "$release_type" = "patch" ]; then
+ echo "This PR was automatically created by the version bump workflow."
+ else
+ echo "This PR was manually triggered via the Actions tab."
+ fi
+ echo "Approve and merge to trigger a new release."
+ } > "$body_file"
+
+ echo "body_file=$body_file" >> "$GITHUB_OUTPUT"
+
# Use peter-evans/create-pull-request with GITHUB_TOKEN so the PR is created
# by github-actions[bot] - this allows the repo owner to approve the PR
- name: Create Pull Request
- if: steps.check.outputs.needs_bump == 'true'
+ if: steps.check.outputs.needs_bump != 'false'
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: auto-bump version to ${{ steps.bump.outputs.new_version }}"
branch: chore/auto-version-bump
delete-branch: true
- title: "chore: auto-bump version to ${{ steps.bump.outputs.new_version }}"
- body: |
- ## Summary
- - Auto-bump patch version: ${{ steps.bump.outputs.current_version }} → ${{ steps.bump.outputs.new_version }}
-
- This PR was automatically created by the version bump workflow.
- Approve and merge to trigger a new release.
+ title: "chore: bump ${{ steps.release.outputs.type }} version to ${{ steps.bump.outputs.new_version }}"
+ body-path: ${{ steps.pr_body.outputs.body_file }}
labels: |
automated
version-bump