-
Notifications
You must be signed in to change notification settings - Fork 0
Add npm-publish workflow for Node.js package #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||
| # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||||||||
| # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||||||||
|
|
||||||||
| name: Node.js Package | ||||||||
|
|
||||||||
| on: | ||||||||
| release: | ||||||||
| types: [created] | ||||||||
|
|
||||||||
| jobs: | ||||||||
| build: | ||||||||
| runs-on: ubuntu-latest | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 20 | ||||||||
|
Comment on lines
+15
to
+17
|
||||||||
| - run: npm ci | ||||||||
| - run: npm test | ||||||||
|
|
||||||||
| publish-npm: | ||||||||
| needs: build | ||||||||
| runs-on: ubuntu-latest | ||||||||
|
Comment on lines
+21
to
+23
|
||||||||
| steps: | ||||||||
| - uses: actions/checkout@v4 | ||||||||
| - uses: actions/setup-node@v4 | ||||||||
| with: | ||||||||
| node-version: 20 | ||||||||
|
Comment on lines
+26
to
+28
|
||||||||
| registry-url: https://registry.npmjs.org/ | ||||||||
|
||||||||
| - run: npm ci | ||||||||
|
||||||||
| - run: npm ci | |
| - run: npm ci | |
| - run: npm run build |
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing release-on-merge.yml workflow already handles automated npm publishing via semantic-release on every push to main (.github/workflows/release-on-merge.yml:43-48). This creates a duplicate publishing mechanism that could cause conflicts. Consider whether this workflow is necessary, or if it serves a different purpose than the existing automated release process. If both are needed, clarify the distinct use cases in comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow specifies Node.js version 20, but the existing CI workflow (.github/workflows/ci.yml:20) and release-on-merge workflow (.github/workflows/release-on-merge.yml:31) both use Node.js version 22. For consistency and to ensure the build environment matches other workflows, this should be updated to version 22.