Repository navigation
Publish to npm from GitHub Actions - #219
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds lix on every pull request and push to master, and publishes it to npm when a version tag is pushed:
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 av*tag to this repo can publish. Each version gets provenance (which commit and workflow run built it).-(e.g.17.1.0-alpha.0) go to thenextdist-tag, all others tolatest. (Right nowlatestis17.0.4-alpha.0, probably by accident.)package.json's version fails the run.npm install -g lix,lix download), thennpm ci --ignore-scriptsandnpm run build, as locally.One-time setup on npmjs.com (package
lix→ Settings → Trusted Publisher → GitHub Actions): organizationlix-pm, repositorylix.client, workflowpublish.yml, no environment.🤖 Generated with Claude Code
https://claude.ai/code/session_01TeC88y1bgCYSeUByEgpUr9