Conversation
Updated npm-publish.yml to match standardized workflow format that triggers on both release creation and pushes to working branch. Removed redundant build job and simplified to single publish job with smart version tagging (dev for pre-releases, latest for stable versions).
1. Vitest config: Moved maxForks/minForks from deprecated poolOptions to top-level 2. Workflow: Skip npm publish for production versions on non-release pushes
Upgraded all workflows from standard 2-core runners to 8-core runners for improved performance.
Pre-release versions (e.g., 1.5.8-dev.0) now include the short git SHA in the published version string (e.g., 1.5.8-dev.0+a1b2c3d). This makes it easier to trace published dev packages back to their source commit. Production versions remain unchanged and only publish on release events.
The npm version command was failing because it validates semver strictly and doesn't like the +sha format. Now we directly modify package.json using Node.js to bypass npm's validation while still updating the version.
npm strips the +sha build metadata when publishing, causing version conflicts. Now using format like 1.5.5-dev.20260131210612.ab169e2 which is valid semver and ensures unique versions for each build.
- Make prompt confirmation injectable to support non-interactive and test environments - Improve repo detection (supports SSH aliases, custom hosts, URLs without .git, and Enterprise/port forms) - Add robust PR creation handling: title truncation to 256 chars with word-boundary logic, reuse-exists check, and improved 422 recovery - Implement richer workflow/release checks: - Inspect repository workflows and determine if they trigger on pull_request or release events - Detect and filter workflow runs triggered by a release (time and SHA-aware) - Wait/monitor logic for PR checks and release workflows with retry, timeout and user prompts - Enhance release creation (unescape serialized newlines) and add helpers for issues/milestones: - create/get releases, list/open/closed issues, milestone find/create/close, move issues between milestones - Helpers to collect issue details and generate release notes respecting token limits - Improve error handling and logging throughout functions Tests: - Add/expand tests in tests/github.test.ts to cover new behavior and edge cases for all updated utilities: - getOctokit, branch/repo detection, create/find PRs, title truncation, waiting for checks, merging PRs, releases, workflows, issues, milestones, and many edge/error cases - Use mocked Octokit and git tools; inject prompt function in tests Files: - src/github.ts - tests/github.test.ts
…stall Move the version check and publish decision logic before npm install steps. This saves significant time when the workflow decides not to publish (e.g., production versions pushed to working branch), as it skips the expensive npm install operations entirely. Time savings: ~2-5 minutes per skipped publish workflow run.
Reduce CI costs by using standard ubuntu-latest runners instead of 8-core runners. The extra cores are not necessary for our build and test workloads.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
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.
Automated release PR.