Loading...
Loading...
End-to-end npm release workflow with verification gates and hardcoded-version protection
npx skill4agent add proffesor-for-testing/agentic-qe releaseagentic-qe| File | Package Name | Role |
|---|---|---|
| | Published to npm — the installable package |
| | Actual implementation — CLI, MCP, domains |
prepublishOnlycd v3 && npm run buildnpm publishrelease: published.github/workflows/npm-publish.yml<version>3.5.5git status
git branch --show-currentpackage.json# Read current version
node -p "require('./package.json').version"
node -p "require('./v3/package.json').version"
# Search for version strings in source files
grep -rn --include="*.ts" --include="*.js" --include="*.json" '"3\.[0-9]\+\.[0-9]\+"' . \
--exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.gitpackage.jsonv3/package.json# Bump v3 first (no git tag — we tag manually)
cd /workspaces/agentic-qe-new/v3 && npm version <version> --no-git-tag-version
# Bump root to match
cd /workspaces/agentic-qe-new && npm version <version> --no-git-tag-versiongrep '"version"' package.json v3/package.jsonv3/CHANGELOG.md## [<version>] - YYYY-MM-DD
### Added
- ...
### Fixed
- ...
### Changed
- ...docs/releases/v<version>.md# v<version> Release Notes
**Release Date:** YYYY-MM-DD
## Highlights
<1-2 sentence summary of the most important changes>
## Added
- ...
## Fixed
- ...
## Changed
- ...docs/releases/README.md| [v<version>](v<version>.md) | YYYY-MM-DD | <Short highlights> |npm run buildcd v3 && npm run buildtsc && build:cli && build:mcpnpm run typecheckcd v3 && tsc --noEmitcd /workspaces/agentic-qe-new/v3 && npx vitest run tests/unit/# Verify v3/dist/ exists with expected bundles
ls -la v3/dist/cli/bundle.js
ls -la v3/dist/index.js
ls -la v3/dist/mcp/aqe init --auto# Create a temporary test project
mkdir -p /tmp/aqe-release-test && cd /tmp/aqe-release-test
# Run init using the LOCAL build (not published version)
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js init --auto.agentic-qe/# Version output
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js --version
# System status
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js statuscd /tmp/aqe-release-test
# Verify learning subsystem
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js learning stats 2>&1 | head -10
# Verify agent listing works
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js agent list 2>&1 | head -10
# Verify health check
node /workspaces/agentic-qe-new/v3/dist/cli/bundle.js health 2>&1 | head -10rm -rf /tmp/aqe-release-testcd /workspaces/agentic-qe-new/v3
# Performance gates (fast — validates perf thresholds)
npm run performance:gate
# Regression tests (runs full unit suite)
npm run test:regression
# Full test:ci suite (from npm-publish.yml — excludes browser/e2e)
npm run test:citest:unittest:unit:fasttest:unit:heavytest:unit:mcptest:citest:regressiontest:safetest:perftest:e2etest:coverageperformance:gatecd /workspaces/agentic-qe-new
# Stage version bump + changelog + release docs
git add package.json v3/package.json v3/CHANGELOG.md docs/releases/README.md docs/releases/v<version>.md
# Also stage any files that were fixed during version audit
git status
git commit -m "chore(release): bump version to v<version>"
git push origin <current-branch>
# Create PR to main
gh pr create \
--base main \
--title "chore(release): v<version>" \
--body "$(cat <<'EOF'
## Release v<version>
### Verification Checklist
- [x] Both package.json versions match
- [x] Build succeeds (tsc + CLI + MCP bundles)
- [x] Type check passes
- [x] All unit tests pass
- [x] `aqe init --auto` works in fresh project
- [x] CLI commands functional
- [x] MCP tools load correctly
- [x] Self-learning subsystem initializes
- [x] Journey tests pass
- [x] Code Intelligence tests pass
- [x] Performance gates pass
- [x] Full test:ci suite passes
See [CHANGELOG](v3/CHANGELOG.md) for details.
EOF
)"gh pr merge <pr-number> --mergegit checkout main && git pull origin maingh release create v<version> \
--title "v<version>: <Short Title>" \
--notes "$(cat <<'EOF'
## What's New
<User-friendly summary — focus on value, not technical details>
## Getting Started
\`\`\`bash
npx agentic-qe init --auto
\`\`\`
See [CHANGELOG](v3/CHANGELOG.md) for full details.
EOF
)"v<version>npm-publish.yml# Watch the GitHub Actions workflow
gh run list --workflow=npm-publish.yml --limit 1
gh run watch <run-id>npm run typechecknpm run buildv3/dist/npm run test:cinpm publish --access public --provenancegh run view <run-id> --log-failednpm view agentic-qe@<version> name versionnpx agentic-qe@<version> --version--provenanceprepublishOnlycd v3