Skip to content

Automate package publishing via CI/CD#820

Merged
zachmullen merged 7 commits intomainfrom
tagged-releases
Nov 11, 2025
Merged

Automate package publishing via CI/CD#820
zachmullen merged 7 commits intomainfrom
tagged-releases

Conversation

@zachmullen
Copy link
Copy Markdown
Contributor

This is an alternative proposal to #815. It has the following behavior:

  • The package.json file is never updated manually in the source repo.
  • An actual release is triggered by pushing a tag of the form vX.Y.Z to GitHub. This tag convention is already used by VolView.
  • On any push to main, a prerelease version is published. It takes the latest stable release version from the set of manually created tags, and publishes a prerelease with the preid of dev-<git-SHA>.
  • These prerelease packages are tagged with dev such that anyone who wants to follow the bleeding edge of the package can npm install volview@dev and get the latest prerelease without having to fiddle with git SHAs.

Advantages:

  • CI/CD doesn't push a bunch of commits or tags to the repo. No write permission is required.
  • We still maintain provenance / tracking between npm packages and git commits by virtue of the package itself containing the git commit identifier.
  • The YAML is generally a little simpler and easier to comprehend.

Before we merge this, we'll need to ensure that the relevant NPM token is set in our GH Actions secrets. I also renamed publish.yml to docs.yml to make the intent of each file clearer.

@zachmullen zachmullen requested a review from PaulHax November 10, 2025 16:43
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 10, 2025

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit f71c801
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/69133f64e508770008100e83
😎 Deploy Preview https://deploy-preview-820--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Collaborator

@PaulHax PaulHax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add a section in CONTRIBUTING.md for how to do the manual version bump steps?

Comment thread .github/workflows/prerelease.yml Outdated
Comment thread package.json
Comment thread .github/workflows/prerelease.yml Outdated
Now that we are distributing VolView as a package via npm, we don't want to run build steps via npm lifecycle hooks. If we need to patch the software, it needs to be codified as part of the build steps rather than at install time.
@zachmullen
Copy link
Copy Markdown
Contributor Author

zachmullen commented Nov 10, 2025

@PaulHax PTAL at 27c1a5a. Publishing a volview package to npm is going to necessitate at least this change. But we should also completely overhaul what packages within volview are considered dev dependencies vs. runtime dependencies. Anything that is built into the dist bundle should be moved from dependencies to devDependencies so that it doesn't get unnecessarily pulled into downstreams' node_modules.

The rationale is that npmjs.org only allows a single Trusted Publisher workflow to be configured on a given npm package.
@zachmullen zachmullen added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit 89a7403 Nov 11, 2025
7 checks passed
@zachmullen zachmullen deleted the tagged-releases branch November 11, 2025 14:25
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.

2 participants