nexus-mcp/.github/workflows/version-bump.yml
nathan a961e241cd feat(audit): complete drift detection shard implementation (Yellow → Green)
- Implement 4 production-ready audit scan tools in src/shards/audit.py
  - scan_status_reconciliation: detect terminated users still enabled in AD
  - scan_job_title_drift: detect title mismatches between Workday and AD
  - scan_department_mismatches: detect department/cost center drift
  - scan_name_variance_mismatches: detect display name inconsistencies
- Add comprehensive integration test suite (tests/integration_test_audit_shard.py)
- Create demo client (test_client.py) and MCP protocol simulator (test_mcp_protocol.py)
- Add tool catalog generator (list_tools.py) for visibility across all 33 registered tools
- Fix Windows console encoding in src/main.py to support emoji in shard status output
- Add version management utility (scripts/bump_version.py) for release automation
- Update workday test imports to use new drift_detection module path

Completes session goal of establishing SOC 2-compliant cross-system drift detection
per SESSION_SNAPSHOT_2026-04-13.md. All audit tools validated against mock data
with expected mismatch scenarios (Bob Martinez, Carol Chen, David Kim cases).

Refs: WIS-014, WIS-015, WIS-016, WIS-017, WIS-018
2026-04-13 13:02:03 -04:00

119 lines
3.4 KiB
YAML

name: Auto Version Bump
on:
workflow_dispatch:
inputs:
bump_type:
description: 'Version bump type'
required: true
type: choice
options:
- patch
- minor
- major
update_readme:
description: 'Update README with changes'
required: false
type: boolean
default: true
jobs:
bump-version:
name: Bump Version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install toml
- name: Bump version
id: bump
run: |
python3 << 'EOF'
import toml
import sys
# Read current version
with open('nexus-mcp/pyproject.toml', 'r') as f:
config = toml.load(f)
current = config['project']['version']
major, minor, patch = map(int, current.split('.'))
bump_type = '${{ github.event.inputs.bump_type }}'
if bump_type == 'major':
major += 1
minor = 0
patch = 0
elif bump_type == 'minor':
minor += 1
patch = 0
else: # patch
patch += 1
new_version = f"{major}.{minor}.{patch}"
# Update version
config['project']['version'] = new_version
with open('nexus-mcp/pyproject.toml', 'w') as f:
toml.dump(config, f)
print(f"{current}→{new_version}")
# Export for GitHub Actions
with open(process.env['GITHUB_OUTPUT'], 'a') as f:
f.write(f"old_version={current}\n")
f.write(f"new_version={new_version}\n")
EOF
- name: Update README
if: github.event.inputs.update_readme == 'true'
run: |
DATE=$(date +"%Y-%m-%d")
OLD="${{ steps.bump.outputs.old_version }}"
NEW="${{ steps.bump.outputs.new_version }}"
# Add version entry to README
sed -i "s/version = \"$OLD\"/version = \"$NEW\"/" nexus-mcp/pyproject.toml
echo "Updated version: $OLD → $NEW"
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add nexus-mcp/pyproject.toml
git commit -m "chore: bump version to ${{ steps.bump.outputs.new_version }}"
git tag "v${{ steps.bump.outputs.new_version }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
- name: Create Release Notes
run: |
echo "## Release v${{ steps.bump.outputs.new_version }}" > release_notes.md
echo "" >> release_notes.md
echo "**Previous version:** ${{ steps.bump.outputs.old_version }}" >> release_notes.md
echo "**Bump type:** ${{ github.event.inputs.bump_type }}" >> release_notes.md
echo "" >> release_notes.md
echo "### Changes" >> release_notes.md
git log v${{ steps.bump.outputs.old_version }}..HEAD --pretty=format:"- %s" >> release_notes.md
cat release_notes.md