Skip to content

feat(global-cli): release support#1180

Open
ubugeeei wants to merge 36 commits intomainfrom
feat/publish-support
Open

feat(global-cli): release support#1180
ubugeeei wants to merge 36 commits intomainfrom
feat/publish-support

Conversation

@ubugeeei
Copy link
Copy Markdown
Collaborator

@ubugeeei ubugeeei commented Mar 28, 2026

#1169

Note

These implementations are quite comprehensive and large in scope.
Feel free to treat them as reference implementations and narrow down the scope.

Summary

This PR adds a production-oriented monorepo release workflow to vp release.

The new flow plans workspace releases from git history, computes version bumps, runs release readiness checks, performs package-manager-native publish preflight during --dry-run, supports real publishes with safer defaults, and can generate changelogs and git tags as part of the same workflow.

In addition to the core feature, this branch also includes the CI and stability fixes needed to make the new release flow buildable and green across Linux, macOS, and Windows.

What Changed

  • Added a full vp release orchestration layer for workspace packages
  • Added release planning based on Conventional Commits and SemVer-aware version bumping
  • Added exact-version retry support via --version
  • Added prerelease channel support via --preid
  • Added optional changelog generation for package and workspace release artifacts
  • Added release artifact persistence/rollback handling for manifest and changelog updates
  • Added git tagging support, including a repo-level v<version> tag when all released packages share the same version
  • Added first-release guidance for unpublished packages
  • Added trusted-publishing validation and a GitHub Actions publish workflow template for bootstrap flows
  • Centralized publish command resolution in vite_install so package-manager-specific publish flags, provenance, and env handling are resolved in one place
  • Added shared utilities for Conventional Commit parsing, git helpers, SemVer parsing, version patterns, and package manifest mutation
  • Expanded unit tests and CLI snapshot coverage for the release flow
  • Updated README / CLI docs to describe the new vp release capabilities

Behavior Notes

  • Real releases run detected release checks by default
  • --dry-run can simulate publish behavior without creating durable release artifacts
  • --skip-publish and --no-git-tag remain limited to dry-run usage
  • --version is intended to support retrying partial publishes at an exact target version
  • Trusted publishing is validated as part of the hardened release path

CI / Stabilization Included In This Branch

  • Aligned rolldown workspace dependencies with current upstream naming
  • Fixed Windows-specific path assumptions in tests
  • Isolated VP_HOME in env-related tests to avoid cache-driven flakiness
  • Fixed fixture formatting issues that were causing CLI/snapshot failures

Validation

  • CI is green on Linux, macOS, and Windows
  • Cargo Deny passes
  • CLI E2E passes
  • CLI snapshot tests pass

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 28, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 54e4fde
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ccaf4804882700087c46b3

@ubugeeei ubugeeei force-pushed the feat/publish-support branch from 9ed0f44 to e5e927a Compare March 28, 2026 12:01
@ubugeeei ubugeeei changed the title feat(global-cli): add monorepo release workflow with publish safety checks feat(global-cli): release support Mar 28, 2026
@ubugeeei
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c43ffa0b44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ubugeeei
Copy link
Copy Markdown
Collaborator Author

NOTE: I temporarily removed the Draft status to try triggering a review with Codex, but it is still a draft.

@ubugeeei ubugeeei marked this pull request as ready for review March 29, 2026 17:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3c9209675

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ubugeeei ubugeeei marked this pull request as draft March 29, 2026 17:10
@ubugeeei ubugeeei marked this pull request as ready for review March 31, 2026 06:11
@alvarosabu
Copy link
Copy Markdown
Contributor

That was incredible quick 😂

- name: Install Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version: '22'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

node-version can be left unset, allowing vp to follow the project's node version configuration

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use latest v6 actions/checkout@v6

Comment on lines +28 to +31
`vp release` detects likely checks from `build`, `pack`, `prepack`, `prepublishOnly`, `prepare`, and `vitePlus.release.checkScripts`. Real releases run those checks before publishing unless you pass `--no-run-checks`; dry-runs stay lightweight by default and can opt in with `--run-checks`. `--dry-run` also runs the native publisher in dry-run mode from a temporary release manifest state when the git worktree is clean. Use `--yes` for CI or other non-interactive runs, and `--version <x.y.z>` when retrying a partial publish at an exact version.

Real releases always create git tags after a successful publish. When every released package shares the same target version, `vp release` also creates a repository-level `v<version>` tag so GitHub Releases and repo-wide release notes can follow the same watermark. Preview-only flags such as `--skip-publish` and `--no-git-tag` are therefore limited to `--dry-run`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not the right place for the release docs.

- **`vp build`:** Build applications for production with Vite + Rolldown
- **`vp run`:** Execute monorepo tasks with caching and dependency-aware scheduling
- **`vp pack`:** Build libraries for npm publishing or standalone app binaries
- **`vp release`:** Version and publish workspace packages with native publish preflight during `--dry-run`, release checks before real publishes by default, retry-friendly exact version overrides via `--version`, optional changelog generation via `--changelog`, prerelease channels like `--preid alpha` / `beta` / `rc`, and `--projects` order respected between independent packages
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Everything here should only be one line with 6-7 words or so.

Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Before we continue discussing the code, I would like to see an rfc added to this repo + the corresponding documentation on usage. We should figure out the user experience first, and then look at whether the implementation matches that.

@alvarosabu
Copy link
Copy Markdown
Contributor

alvarosabu commented Apr 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants