git clone https://github.com/modelscript/modelscript.git
cd modelscript
npm install
npm run build- Node.js ≥ 22 (see
.nvmrc) - emsdk — required for building the Tree-sitter WASM parser (see README)
| Command | Description |
|---|---|
npm run dev |
Start all services (API, Morsel, Web, IDE) |
npm run build |
Build all packages |
npm test |
Run tests |
npm run lint |
Run linters |
npm run format |
Format with Prettier |
Releases are triggered manually via GitHub Actions. The workflow versions all publishable packages, generates changelogs, and publishes to all registries.
The following secrets must be set in Settings → Secrets and variables → Actions:
| Secret | Source | Purpose |
|---|---|---|
NPM_TOKEN |
npmjs.com | Publish @modelscript/core, @modelscript/cli, @modelscript/tree-sitter-modelica |
VSCE_PAT |
Azure DevOps → Personal access tokens | Publish VS Code extension to Marketplace |
OVSX_PAT |
open-vsx.org | Publish VS Code extension to Open VSX |
DEPLOY_PAT |
GitHub → Personal access tokens (classic) | Push version commits and tags back to the repo |
- Go to Actions → Release → Run workflow
- Select the version bump type:
patch— bug fixes (0.0.x)minor— new features (0.x.0)major— breaking changes (x.0.0)prepatch/preminor/premajor— pre-release versions
- Check "Is this the first release?" if there are no existing tags
- Click Run workflow
The workflow runs these steps in order:
- Build, Test, Lint — ensures main is healthy
- Version & Changelog — bumps versions using conventional commits, generates changelogs, creates a GitHub Release
- Publish to npm —
@modelscript/core,@modelscript/cli,@modelscript/tree-sitter-modelica - Publish VS Code Extension — packages VSIX, publishes to VS Code Marketplace and Open VSX
- Publish Docker Images — builds and pushes to GHCR (
ghcr.io/modelscript/*) with:latestand:versiontags - Push tags — pushes version commits and git tags back to the repo
To preview what a release would do without publishing:
npm run release:dry-runEvery push to main and every pull request triggers the CI workflow (.github/workflows/ci.yml), which:
- Builds all packages
- Runs tests
- Runs linters
- Packages the VS Code extension (VSIX artifact)
- Deploys Morsel and IDE to GitHub Pages (main only)
- Builds and pushes Docker images to GHCR as
:latest(main only)
Follow Conventional Commits — the release workflow uses them to generate changelogs automatically.
feat: add simulation CSV export
fix: correct array dimension mismatch in flattener
docs: update CLI usage examples
refactor: simplify DAE printer ordering