Publishing
August 10, 2026 · View on GitHub
Scope: versioning and releasing
DataGrid.*NuGet packages and@laczynski/datagrid*npm packages.
Registries
| Package | Primary registry | Secondary (NuGet only) |
|---|---|---|
Laczynski.DataGrid.Abstractions | nuget.org | GitHub Packages |
Laczynski.DataGrid.Core | nuget.org | GitHub Packages |
Laczynski.DataGrid.EntityFrameworkCore | nuget.org | GitHub Packages |
@laczynski/datagrid | npmjs.com | GitHub Packages (npm) |
@laczynski/datagrid-primeng | npmjs.com | GitHub Packages (npm) |
@laczynski/datagrid-ui | npmjs.com | GitHub Packages (npm) |
@laczynski/datagrid-spartan | npmjs.com | GitHub Packages (npm) |
@laczynski/datagrid-cli | npmjs.com | GitHub Packages (npm) |
All packages publish on tag push v* via publish.yml (trusted publishing / OIDC).
NuGet RepositoryUrl and npm repository in package.json link packages to this repo on GitHub Packages.
Where versions live
| Stack | Location |
|---|---|
| NuGet (shared) | src/dotnet/Directory.Build.props → <Version> |
| npm per package | src/npm/packages/*/package.json → "version" |
| primeng / ui / spartan | peerDependencies["@laczynski/datagrid"] must match core version |
| cli | no @laczynski/datagrid peer — schematics only |
Release checklist
-
Bump versions in
Directory.Build.propsand npmpackage.jsonfiles. -
Update
CHANGELOG.md. -
Verify locally:
npm run test:all npm run build:all npm run lint:frontend npm run pack:backend npm run pack:npm -
Tag and push:
git tag v0.1.0-preview.13 git push origin v0.1.0-preview.13publish.yml runs tests, then publishes NuGet (nuget.org + GitHub Packages), npm (npmjs.com + GitHub Packages), and creates a GitHub Release from
CHANGELOG.md.
One-time setup
GitHub secret
Settings → Secrets and variables → Actions:
| Secret | Value |
|---|---|
NUGET_USER | nuget.org profile name (not email) |
nuget.org trusted publishing
-
nuget.org → profile → Trusted Publishing → Add.
-
Policy fields:
Field Value Package Owner your nuget.org account Repository Owner laczynskiRepository DataGridWorkflow File publish.ymlEnvironment (leave empty)
npm trusted publishing
For each package (@laczynski/datagrid, @laczynski/datagrid-primeng, @laczynski/datagrid-ui, @laczynski/datagrid-spartan, @laczynski/datagrid-cli):
npmjs.com → package → Settings → Trusted Publisher → GitHub Actions:
| Field | Value |
|---|---|
| Organization or user | laczynski |
| Repository | DataGrid |
| Workflow filename | publish.yml |
| Environment | (leave empty) |
No NPM_TOKEN secret — CI uses OIDC (npm CLI ≥ 11.5.1, upgraded in the workflow).
New packages (@laczynski/datagrid-spartan, @laczynski/datagrid-cli): create each package on npmjs.com (or let the first trusted publish create it), then add the trusted publisher before tagging a release that includes them.
GitHub repository settings
Actions enabled; workflow permissions allow packages: write and OIDC (id-token: write is set in the workflow).
Publish workflow (tag v*)
.github/workflows/publish.yml:
- Test + lint
- Pack NuGet + npm
- Publish NuGet to nuget.org and GitHub Packages (OIDC +
GITHUB_TOKEN) - Publish npm to npmjs.com with
--provenance(OIDC) and GitHub Packages (GITHUB_TOKEN) - Create GitHub Release from
CHANGELOG.md
Prerelease tags (v*-*) publish npm with dist-tag preview; stable tags use latest.
Consumer setup
NuGet (nuget.org)
dotnet add package Laczynski.DataGrid.EntityFrameworkCore --version 0.1.0-preview.13
NuGet (GitHub Packages)
Copy nuget.config.example. Replace OWNER with laczynski.
dotnet nuget add source --username YOUR_GITHUB_USERNAME --password YOUR_PAT --store-password-in-clear-text --name github "https://nuget.pkg.github.com/OWNER/index.json"
dotnet add package Laczynski.DataGrid.EntityFrameworkCore --version 0.1.0-preview.12
In GitHub Actions on a consuming repo, use GITHUB_TOKEN with read access to the package.
npm (GitHub Packages)
Scoped packages use the @laczynski namespace on npm.pkg.github.com. Add .npmrc (or project-level config):
@laczynski:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
Use a personal access token (classic) with at least read:packages. In GitHub Actions on a consuming repo, use GITHUB_TOKEN with packages: read.
npm install @laczynski/datagrid@preview
See Working with the npm registry on GitHub Packages.
npm (npmjs.com)
Public packages — no special .npmrc required:
npm install @laczynski/datagrid@preview @laczynski/datagrid-primeng@preview @laczynski/datagrid-ui@preview @laczynski/datagrid-spartan@preview
npm install -D @laczynski/datagrid-cli@preview
Spartan L1 — @laczynski/datagrid-spartan only (built-in dg-sh-* helm).
Spartan L3 — add @laczynski/datagrid-cli, install Spartan helm in the app, then:
ng generate @laczynski/datagrid-cli:spartan-grid --level=full
See spartan-l3-hlm.md.
App integration
See getting-started.md.
Optional: local NuGet.org push (API key)
Trusted publishing works in CI only. For a local push without OIDC:
$apiKey = "<nuget.org-api-key>"
dotnet nuget push artifacts/nuget/Laczynski.DataGrid.EntityFrameworkCore.*.nupkg --api-key $apiKey --source https://api.nuget.org/v3/index.json