CI & Release Workflow
Relevant source files
The following files were used as context for generating this wiki page:
The CI & Release Workflow for Svelte Effect Runtime (SER) is a structured process designed to manage a multi-package workspace. It ensures that changes are validated through automated testing and linting before being merged, and that releases are synchronized across all publishable modules. The workflow relies on pnpm for package management and Vite+ (vp) for build and validation tasks.
Sources: CONTRIBUTING.md:3-10, package.json:42-53
Development Workflow
The development lifecycle follows a strict branch-based strategy. Developers must create specific branches for coherent changes and are prohibited from pushing directly to the master branch without human approval. Validation occurs at multiple levels: local formatting, type checking, linting, and full workspace testing.
Local Validation Commands
Workspace-wide commands are managed through the root package.json. These scripts often delegate to specific module directories or use the vp (Vite+) binary for execution.
| Command | Action |
|---|---|
pnpm run test | Executes the Vitest suite for runtime, grammars, and language server. |
pnpm run build | Performs a full workspace build including LSPs and extensions. |
pnpm run check | Runs type checks across all modules. |
pnpm run lint | Executes linting using the vp lint utility. |
pnpm run fmt | Formats source files according to project conventions. |
Sources: CONTRIBUTING.md:43-65, package.json:6-24
Branching and Commits
The project enforces "Git Etiquette" where every successful change requires a commit to a relevant remote branch. Commit messages must follow conventional prefixes (e.g., fix:, docs:) and remain brief.
The flow ensures that only validated and approved code reaches the master branch, which is the trigger for the release process.
Sources: AGENTS.md:10-21, CONTRIBUTING.md:92-96
Continuous Integration (CI)
The CI system is triggered by pushes to the master branch. Its primary role is to detect version changes and execute the full validation pipeline. If a version bump is detected in the package.json files, the CI automatically initiates the publishing sequence.
Synchronization Requirements
A critical constraint of the CI workflow is version synchronization. All publishable packages in the workspace must share the exact same semantic version. The CI monitors these four files:
modules/svelte-effect-runtime/package.jsonmodules/svelte-effect-runtime-grammars/package.jsonmodules/svelte-effect-runtime-language-server/package.jsonmodules/svelte-effect-runtime-vsix/package.json
If these versions drift or are out of sync, the release job within the CI workflow will fail.
Sources: CONTRIBUTING.md:101-110, AGENTS.md:158-175
Release Workflow
The release workflow is an automated sequence that handles the distribution of SER packages to npm and the VS Code Marketplace. It is triggered exclusively by a version change on the master branch.
Release Sequence
When a version bump is approved and merged:
- Build & Test: The workspace is built, and the full test suite (Vitest) is executed.
- Tagging: A git tag is created for the new version.
- GitHub Release: A GitHub release is generated.
- Publishing:
- Packages are published to npm.
- The VS Code extension is published to the VS Code Marketplace and OpenVSX.
Manual Release Steps (Grammars)
For specific assets like grammars, manual publish rehearsals or targeted builds can be performed using the following steps:
- Run
corepack pnpm run build:grammars. - Pack the module using
vp node build/pack.ts svelte-effect-runtime-grammars. - Publish using the
.tgzfile located in the.distdirectory.
Sources: svelte-effect-runtime-grammars/README.md:13-25
Summary
The CI & Release workflow for Svelte Effect Runtime ensures high reliability by enforcing strict version synchronization across its four core modules. By utilizing a centralized build system (Vite+) and mandatory automated testing, the project prevents regressive changes from reaching the production registries while maintaining a streamlined path from master branch updates to multi-platform distribution.
Sources: CONTRIBUTING.md:107-110, AGENTS.md:173-175