Publishing

August 10, 2026 · View on GitHub

Scope: versioning and releasing DataGrid.* NuGet packages and @laczynski/datagrid* npm packages.

Registries

PackagePrimary registrySecondary (NuGet only)
Laczynski.DataGrid.Abstractionsnuget.orgGitHub Packages
Laczynski.DataGrid.Corenuget.orgGitHub Packages
Laczynski.DataGrid.EntityFrameworkCorenuget.orgGitHub Packages
@laczynski/datagridnpmjs.comGitHub Packages (npm)
@laczynski/datagrid-primengnpmjs.comGitHub Packages (npm)
@laczynski/datagrid-uinpmjs.comGitHub Packages (npm)
@laczynski/datagrid-spartannpmjs.comGitHub Packages (npm)
@laczynski/datagrid-clinpmjs.comGitHub 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

StackLocation
NuGet (shared)src/dotnet/Directory.Build.props<Version>
npm per packagesrc/npm/packages/*/package.json"version"
primeng / ui / spartanpeerDependencies["@laczynski/datagrid"] must match core version
clino @laczynski/datagrid peer — schematics only

Release checklist

  1. Bump versions in Directory.Build.props and npm package.json files.

  2. Update CHANGELOG.md.

  3. Verify locally:

    npm run test:all
    npm run build:all
    npm run lint:frontend
    npm run pack:backend
    npm run pack:npm
    
  4. Tag and push:

    git tag v0.1.0-preview.13
    git push origin v0.1.0-preview.13
    

    publish.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:

SecretValue
NUGET_USERnuget.org profile name (not email)

nuget.org trusted publishing

  1. nuget.org → profile → Trusted PublishingAdd.

  2. Policy fields:

    FieldValue
    Package Owneryour nuget.org account
    Repository Ownerlaczynski
    RepositoryDataGrid
    Workflow Filepublish.yml
    Environment(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 → SettingsTrusted PublisherGitHub Actions:

FieldValue
Organization or userlaczynski
RepositoryDataGrid
Workflow filenamepublish.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:

  1. Test + lint
  2. Pack NuGet + npm
  3. Publish NuGet to nuget.org and GitHub Packages (OIDC + GITHUB_TOKEN)
  4. Publish npm to npmjs.com with --provenance (OIDC) and GitHub Packages (GITHUB_TOKEN)
  5. 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