From 3aab9648d8efc62c2b65f41ab276d006b8da12a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Feb 2026 15:17:57 -0700 Subject: [PATCH] fix: sync v2.0.0 release and use PR for publish version bumps - Bump package.json from 1.4.0 to 2.0.0 to match what was published on npm (the CI version bump commit could not be pushed due to branch protection) - Update optionalDependencies to reference 2.0.0 platform packages - Rename CHANGELOG 1.5.0 header to 2.0.0 to match the actual release - Replace direct git push to main in publish workflow with creating a release/vX.Y.Z branch and opening a PR via gh, which respects branch protection rules requiring PRs and status checks - Add pull-requests: write permission to the publish job --- .github/workflows/publish.yml | 28 +++++++++++++++++++++++----- CHANGELOG.md | 2 +- package.json | 10 +++++----- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b3caa4b3..5a65aee4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -98,6 +98,7 @@ jobs: permissions: contents: write id-token: write + pull-requests: write steps: - uses: actions/checkout@v4 @@ -229,12 +230,29 @@ jobs: if: "!inputs.dry-run" run: npm publish --access public --provenance - - name: Push version commit and tag - if: github.event_name == 'workflow_dispatch' && !inputs.dry-run + - name: Push version bump via PR + if: "!inputs.dry-run" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git push origin main - TAG="v${{ steps.version.outputs.new_version }}" - # Skip if tag already exists on remote (e.g. created by a GitHub release) + VERSION="${{ steps.version.outputs.new_version }}" + TAG="v${VERSION}" + BRANCH="release/v${VERSION}" + + # Check if there are version bump changes to push + if git diff --quiet HEAD; then + echo "No version bump commit to push — skipping PR" + else + git push origin "HEAD:refs/heads/${BRANCH}" + gh pr create \ + --base main \ + --head "$BRANCH" \ + --title "chore: release v${VERSION}" \ + --body "Automated version bump to \`${VERSION}\` and CHANGELOG update from publish workflow run [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})." + echo "::notice::Version bump PR created for ${BRANCH} → main" + fi + + # Push tag (skip if it already exists on remote) if git ls-remote --tags origin "refs/tags/$TAG" | grep -q .; then echo "Tag $TAG already exists on remote — skipping tag push" else diff --git a/CHANGELOG.md b/CHANGELOG.md index d81a8f2d..03c4d064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. -## [1.5.0](https://github.com/optave/codegraph/compare/v1.4.0...v1.5.0) (2026-02-22) +## [2.0.0](https://github.com/optave/codegraph/compare/v1.4.0...v2.0.0) (2026-02-22) **Phase 2.5 — Multi-Repo MCP & Structural Analysis.** This release adds multi-repo support for AI agents, structural analysis with architectural metrics, and hardens security across the MCP server and SQL layers. diff --git a/package.json b/package.json index a7810701..79c9a464 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@optave/codegraph", - "version": "1.4.0", + "version": "2.0.0", "description": "Local code graph CLI — parse codebases with tree-sitter, build dependency graphs, query them", "type": "module", "main": "src/index.js", @@ -61,10 +61,10 @@ "optionalDependencies": { "@huggingface/transformers": "^3.8.1", "@modelcontextprotocol/sdk": "^1.0.0", - "@optave/codegraph-darwin-arm64": "1.4.0", - "@optave/codegraph-darwin-x64": "1.4.0", - "@optave/codegraph-linux-x64-gnu": "1.4.0", - "@optave/codegraph-win32-x64-msvc": "1.4.0" + "@optave/codegraph-darwin-arm64": "2.0.0", + "@optave/codegraph-darwin-x64": "2.0.0", + "@optave/codegraph-linux-x64-gnu": "2.0.0", + "@optave/codegraph-win32-x64-msvc": "2.0.0" }, "devDependencies": { "@biomejs/biome": "^2.4.4",