Skip to content

Refactor release into separate child workflows with isolated deployment environments#45

Merged
data-douser merged 14 commits intomainfrom
dd/update-release-artifact-upload/3
Feb 11, 2026
Merged

Refactor release into separate child workflows with isolated deployment environments#45
data-douser merged 14 commits intomainfrom
dd/update-release-artifact-upload/3

Conversation

@data-douser
Copy link
Copy Markdown
Collaborator

@data-douser data-douser commented Feb 10, 2026

Summary of Changes

This pull request significantly refactors the release workflow by splitting the monolithic build-and-release job into modular, reusable workflow components. The new structure improves maintainability, clarity, and parallelizes independent release steps. Three new reusable workflows are introduced for tagging, npm publishing, and CodeQL pack publishing, and the main release workflow orchestrates these steps, ensuring proper sequencing and artifact handling.

Outline of Changes

Release workflow modularization and orchestration:

  • Refactored .github/workflows/release.yml to orchestrate the release process using four distinct jobs: resolving the release version, ensuring the tag exists, publishing the npm package, and publishing/bundling CodeQL packs. Each step is now handled by a separate workflow file, improving clarity and maintainability.

Reusable workflow creation:

  • Added .github/workflows/release-tag.yml: Handles creation and validation of the release tag, updates version-bearing files, runs build and tests, and outputs the tag SHA and release name.
  • Added .github/workflows/release-npm.yml: Handles publishing the npm package to npmjs.org via OIDC trusted publishing, including build steps and artifact uploads.
  • Added .github/workflows/release-codeql.yml: Handles publishing and bundling CodeQL tool query packs, with input controls for publishing, and outputs for downstream jobs.

Parallelization and artifact management:

  • The workflows for publishing npm and CodeQL packs now run in parallel after the tag is ensured, and their artifacts are downloaded in the final release job for distribution assembly.

Validation and output improvements:

  • Each workflow validates the release version format, and outputs standardized values (such as release_name, version, and tag_sha) for downstream jobs and summary reporting. [1] [2] [3]

These changes collectively improve the reliability, modularity, and clarity of the release process.

Split the monolithic release.yml into dedicated child workflows
(release-tag, release-npm, release-codeql) callable independently
via workflow_dispatch. Add environment protection gates to all
three publish workflows. Isolate CodeQL pack operations from npm
publish to prevent .codeql/ and .qlx contamination. Use npm ci
instead of npm install in all workflows except release-tag.

Also add .codeql exclusion to server/.npmignore as defense-in-depth.
@data-douser data-douser self-assigned this Feb 10, 2026
@data-douser data-douser added the bug Something isn't working label Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 22:20
@data-douser data-douser added the enhancement New feature or request label Feb 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 10, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/download-artifact 6.*.* 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1017 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool detected but not run on all commits
Vulnerabilities🟢 64 existing vulnerabilities detected
npm/client 2.24.1-rc1 UnknownUnknown
npm/server 2.24.1-rc1 🟢 3.5
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Code-Review⚠️ 1Found 4/30 approved changesets -- score normalized to 1
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • .github/workflows/release.yml
  • package-lock.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the GitHub release pipeline by splitting the previous monolithic release job into reusable workflows for tag creation, npm publishing, and CodeQL pack publishing/bundling, with a coordinating release.yml orchestrator to improve maintainability and parallelism.

Changes:

  • Reworked .github/workflows/release.yml into a multi-job orchestrator that delegates to reusable workflows.
  • Added reusable workflows for tag creation (release-tag.yml), npm publishing (release-npm.yml), and CodeQL pack publish/bundle (release-codeql.yml).
  • Updated server/.npmignore to exclude generated CodeQL pack cache/dependency directories.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/.npmignore Excludes .codeql directories from npm package output to avoid shipping generated pack caches/deps.
.github/workflows/release.yml Orchestrates the release flow via reusable workflows and assembles final GitHub Release assets from artifacts.
.github/workflows/release-tag.yml Implements tag creation + version update/build/test flow (but has an output wiring issue and risky staging).
.github/workflows/release-npm.yml Publishes the npm package from the tag and uploads a “clean build” artifact for final packaging.
.github/workflows/release-codeql.yml Publishes and bundles CodeQL packs from the tag, uploading bundled pack artifacts for the final release.

- Rename package to unscoped `codeql-development-mcp-server`
- Switch from GitHub Packages to public npmjs.org registry
- Use OIDC trusted publishing (no tokens, auto-provenance)
- Make release.yml the sole dispatch entry point with
  configurable publish_npm, publish_codeql_packs, and
  create_github_release flags
- Remove workflow_dispatch from child workflows (release-npm,
  release-codeql, release-tag) to comply with OIDC validation
- Fix release-tag.yml: wire tag_sha output to final-sha step,
  guard git add -A against staging CodeQL artifacts
- Add setup-packs.sh script (shipped in npm package) to install
  CodeQL pack dependencies from bundled lock files
- Update all docs, tests, and SKILL.md references
Copilot AI review requested due to automatic review settings February 11, 2026 01:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 35 changed files in this pull request and generated 6 comments.

- Handle prerelease versions in release-npm workflow by detecting semver
  prerelease identifiers and passing --tag to npm publish (e.g.,
  2.24.1-beta.1 publishes with --tag beta)
- Remove ./ prefix from bin paths in server/package.json to eliminate
  "script name was invalid and removed" warnings
- Normalize repository.url to git+https:// format per npm conventions
Copilot AI review requested due to automatic review settings February 11, 2026 03:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 35 changed files in this pull request and generated 6 comments.

@data-douser
Copy link
Copy Markdown
Collaborator Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

@data-douser I've opened a new pull request, #46, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI review requested due to automatic review settings February 11, 2026 04:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@data-douser data-douser marked this pull request as ready for review February 11, 2026 04:24
@data-douser data-douser requested review from a team and enyil as code owners February 11, 2026 04:24
@data-douser data-douser enabled auto-merge (squash) February 11, 2026 04:37
github-actions bot and others added 2 commits February 11, 2026 04:41
The npm/npx installation path was broken by two issues:

1. The import.meta.url entry guard used resolve() which does
   not follow symlinks. Global npm installs create a symlink
   (e.g. /opt/homebrew/bin/… → node_modules/.../dist/…), so
   the paths never matched and main() was never called. The
   server exited silently.
   Fix: use realpathSync(resolve(…)) to follow symlinks.

2. dotenv v17 prints a banner to stdout by default, which
   corrupts the MCP stdio JSON-RPC channel.
   Fix: pass quiet: true to dotenv.config().
Copilot AI review requested due to automatic review settings February 11, 2026 05:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated 2 comments.

github-actions bot and others added 2 commits February 11, 2026 05:40
Updates the user-facing server/README.md to be a
useful for external use, where the server/README.md
doc is now used as the home paga for published
npmjs.com packages for codeql-development-mcp-server.
Copilot AI review requested due to automatic review settings February 11, 2026 06:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 20 changed files in this pull request and generated 1 comment.

@data-douser data-douser disabled auto-merge February 11, 2026 06:30
@data-douser data-douser merged commit 55addfd into main Feb 11, 2026
3 checks passed
@data-douser data-douser deleted the dd/update-release-artifact-upload/3 branch February 11, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants