npm release by tag for TypeScript libraries
Publish a TypeScript npm library from a pushed version tag with provenance and no stored token, through a rerunnable publish helper.
Good for
- Publishing from GitHub without storing an npm token
- Updating the version in every file at once before a release
- Rerunning a failed release without publishing anything twice
Not for
- Packages with several platform builds; extend the publish script for those.
- Publishing libraries written in Python or Go
Project examples
Published parsing library
A TypeScript parsing library that users install from npm, with tagged releases publishing the same tested package and type declarations.
Scoped utility package
A utility library distributed under an organization's npm scope, with TypeScript declarations and releases published from GitHub version tags.
What it adds
Files
- CHANGELOG.md.tmpl
- scripts/publish.ts
- scripts/release.ts
- tests/release/publish.test.ts
- tests/release/release.test.ts
Commands
- release
- Bump the version everywhere for a release (bun run release X.Y.Z); never commits, tags or pushes
| Step | Phase | Layer | Command |
|---|---|---|---|
| release-publish | check | test | bun run test tests/release |
| release-workflow | check | check | f=.github/workflows/release.yml; test -f $f && grep -Eq 'tags: \["v\*"\]' $f && grep -q 'id-token: write' $f && ! grep -Eq 'NPM_TOKEN|NODE_AUTH_TOKEN|stacks:fill' $f && grep -q '"repository"' package.json || { echo "$f needs a v* tag trigger, id-token: write, no npm token and no stacks:fill, and package.json needs a repository field" >&2; exit 1; } |
Stacks using it
28 days through 19 Nov 2026. Counts rounded to 5.
| Start a project | ||||
|---|---|---|---|---|
| TypeScript npm library | Add-on | – | – | npx @steamfield/stacks new typescript-library --with npm-release |
Usage
hidden: too few projects using this fragment in the 28 days through 19 Nov 2026.
Weekly projects by stack
Projects whose final fragment set included this fragment, grouped by stack.
Not enough runs in this breakdown yet.
Stacks projects per UTC week through 19 Nov 2026. Counts rounded to 5.
Other release fragments
28 days through 19 Nov 2026. Counts rounded to 5.
| Summary | Weekly projects, last 12 weeks | ||
|---|---|---|---|
| Bun binary releases | Distribute compiled Bun binaries for macOS and glibc Linux with checksum-verified installation, atomic self-update and a release workflow. | 10 | Too few projects per week to chart. |
| GoReleaser | Publish Go binaries for multiple operating systems from version tags, with archives, checksums, changelogs and optional Homebrew distribution. | Too few projects | Too few projects per week to chart. |
Computed 20 Nov 2026, through 19 Nov 2026. Numbers describe stacks projects, not the ecosystem.