Skip to content

Publish to npm from GitHub Actions - #219

Merged
back2dos merged 2 commits into
masterfrom
ci-publish
Nov 25, 2026
Merged

back2dos merged 2 commits into
masterfrom
ci-publish

Conversation

@back2dos

@back2dos back2dos commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Builds lix on every pull request and push to master, and publishes it to npm when a version tag is pushed:

npm version 17.1.0      # bumps package.json, commits, tags v17.1.0
git push --follow-tags

Publishing uses npm's trusted publishing: npm accepts this workflow's GitHub OIDC token for lix, so there's no npm token anywhere. Whoever can push a v* tag to this repo can publish. Each version gets provenance (which commit and workflow run built it).

  • Versions with a - (e.g. 17.1.0-alpha.0) go to the next dist-tag, all others to latest. (Right now latest is 17.0.4-alpha.0, probably by accident.)
  • A tag that doesn't match package.json's version fails the run.
  • The build bootstraps with the released lix (npm install -g lix, lix download), then npm ci --ignore-scripts and npm run build, as locally.

One-time setup on npmjs.com (package lix → Settings → Trusted Publisher → GitHub Actions): organization lix-pm, repository lix.client, workflow publish.yml, no environment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TeC88y1bgCYSeUByEgpUr9

back2dos and others added 2 commits November 25, 2026 19:40
… to npm when a version tag is pushed:

```
npm version 17.1.0      # bumps package.json, commits, tags v17.1.0
git push --follow-tags
```

Publishing uses npm's [trusted publishing](https://docs.npmjs.com/trusted-publishers): npm accepts this workflow's GitHub OIDC token for `lix`, so there's no npm token anywhere. Whoever can push a `v*` tag to this repo can publish. Each version gets provenance (which commit and workflow run built it).

- Versions with a `-` (e.g. `17.1.0-alpha.0`) go to the `next` dist-tag, all others to `latest`. (Right now `latest` is `17.0.4-alpha.0`, probably by accident.)
- A tag that doesn't match `package.json`'s version fails the run.
- The build bootstraps with the released lix (`npm install -g lix`, `lix download`), then `npm ci --ignore-scripts` and `npm run build`, as locally.

**One-time setup on npmjs.com** (package `lix` → Settings → Trusted Publisher → GitHub Actions): organization `lix-pm`, repository `lix.client`, workflow `publish.yml`, no environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01TeC88y1bgCYSeUByEgpUr9
EOF2
Publish to npm from GitHub Actions.

Builds on pull requests and master; publishes on v* tags via npm's
trusted publishing (no npm token). Prereleases go to `next`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeC88y1bgCYSeUByEgpUr9
…ompares it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeC88y1bgCYSeUByEgpUr9
@back2dos
back2dos merged commit 55d68a7 into master Nov 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant