Skip to content

Publish each library's build to a branch, for use before npm - #5

Merged
adamjohnwright merged 2 commits into
mainfrom
publish-builds
Oct 3, 2026
Merged

adamjohnwright merged 2 commits into
mainfrom
publish-builds

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Until the libraries are released to npm, WebsiteAngular (and anyone else) installs them from GitHub.

How it works:

  • After Tests passes for a push to main, a new workflow builds the libraries.
  • It commits each library's build to its own branch: dist/ngx-reactome-cytoscape-style, dist/ngx-reactome-style, dist/ngx-reactome-diagram. The package sits at the branch root.
  • A consumer depends on github:reactome/ngx-reactome-base#dist/<library>. Its lockfile pins the exact build commit.

This is the same pattern WebsiteAngular already uses for the cytoscape.js fork (#svg-export-dist).

Safeguards:

  • Only tested main commits are published, and only for push events: a PR run never publishes.
  • One publish runs at a time.
  • Each build is a new commit on top of the last, with the source commit in its message.
  • A library with no changes is skipped.

Checked:

  • Rehearsed the publish step against a local repository: first publish; a re-run with nothing changed (skipped); a change to one library (only that one published).
  • npm installs from such a branch, and the lockfile records the commit sha.

The README says how to install from these branches.

🤖 Generated with Claude Code

Adam Wright and others added 2 commits October 3, 2026 15:38
Until the libraries are released to npm, a passing push to main puts each
built library on its own branch -- dist/<library> -- with the package at the
root, which npm installs as a git dependency. Only commits whose tests
passed are published, one publish at a time, and each build is a commit on
top of the last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…build

From review: a manual run from another branch would have published that
branch untested; checkout left the write token in .git/config while npm
install scripts and the build ran; and test runs finishing out of order
could publish an older build over a newer one. Manual runs are main only,
the token reaches only the push step, and a commit that is no longer main's
tip is not published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 7f1f1e6 into main Oct 3, 2026
1 check passed
@adamjohnwright
adamjohnwright deleted the publish-builds branch October 3, 2026 15:43
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