Repository navigation
Conversation
Replace the MCP-only release workflow with a single job that builds and smokes all bundles, checks tag/version alignment, publishes packages in dependency order with npm provenance, skips versions already on npm, and creates GitHub releases from CHANGELOG sections. Co-authored-by: Vinicius Lana <viniciuslanadev@gmail.com>
Co-authored-by: Vinicius Lana <viniciuslanadev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs
.github/workflows/release.ymlso av*tag push builds, verifies, and publishes all five scoped packages in the correct order, creates a GitHub Release fromCHANGELOG.md, and supports safe workflow reruns.Root cause (why publish kept failing)
Investigation used workflow job metadata (failed step:
Publish @dotcontext/mcpin run 28307163833) and npm publish timestamps. Logs for those runs are no longer available (GitHub API410), but the pattern is consistent acrossv0.9.x–v1.1.1:9a41307, the workflow only dry-ran/published@dotcontext/mcp. The other four packages were always manual perCONTRIBUTING.md, so a green “release” job never meant a full release.npm publish --dry-runcompletes without registry authentication (npm only warns). The verify job could pass even whenNPM_TOKENwas missing, expired, or read-only.publish-mcp-package, which failed immediately; npm shows the same versions published minutes later by hand (e.g.v1.1.1workflow failed at01:07:17Z,@dotcontext/mcp@1.1.1appeared at01:23:37Z). That timing matches auth rejection (ENEEDAUTH/E401/EOTP), not tarball build problems.package.jsonalignment.What changed
releasejob:npm ci→build:packages→smoke:packages→ tag/version verification → dry-run all packages →npm whoamion tag pushes → publish all packages → GitHub Release from changelog.scripts/verify-release-version.js— tagvX.Y.Zmust match root and bundle versionsscripts/publish-package-bundles.js— publish orderharness→cli→mcp→integrations→pi, skip versions already on npm, optional--provenancescripts/extract-changelog-section.js— release notes forsoftprops/action-gh-releaseworkflow_dispatchkeeps build/smoke/dry-run only (no publish/release).CONTRIBUTING.mddocuments automated vs manual release paths.Maintainer action required (repo/npm settings)
Please verify before the next tag (no secrets changed in this PR):
NPM_TOKENsecret — Use an npm Automation token with publish access to all@dotcontext/*packages (classic publish tokens break when 2FA/OTP is required in CI). After merging, run the Release workflow viaworkflow_dispatchis insufficient for auth proof; usenpm whoamilocally with the same token class, or rely on the newnpm whoamistep on the first tag push.@dotcontext/cli,harness,mcp,integrations,pi), configure npm Trusted Publishers for repositoryvinilana/dotcontext, workflow file.github/workflows/release.yml, and environment*(or a dedicated environment). This pairs with--provenanceenabled on tag pushes. If provenance publish fails, temporarily set job envNPM_PROVENANCE: '0'or fix trusted-publisher linkage.contents: writeandid-token: writefor releases and provenance. Ensure repo Settings → Actions → General → Workflow permissions allows GITHUB_TOKEN to create releases (or use a PAT if org policy restricts default token).Validation
npm run test:release-scriptsnode scripts/verify-release-version.js v1.1.1(on current tree)DRY_RUN=1 node scripts/publish-package-bundles.js 1.1.1(skips already-published versions)Out of scope (per request)