Skip to content

Create npm-publish-github-packages.yml#3

Merged
deargvp1 merged 1 commit into
masterfrom
deargvp1-patch-1
May 16, 2026
Merged

Create npm-publish-github-packages.yml#3
deargvp1 merged 1 commit into
masterfrom
deargvp1-patch-1

Conversation

@deargvp1
Copy link
Copy Markdown
Owner

@deargvp1 deargvp1 commented May 16, 2026

@deargvp1


Summary by cubic

Add a GitHub Actions workflow to build, test, and publish the Node package to GitHub Packages when a release is created. This automates publishing with Node 20 and removes manual steps.

  • New Features
    • Triggers on release (type: created) and publishes to https://npm.pkg.github.com/.
    • Build job runs npm ci and npm test on Ubuntu.
    • Publish job runs npm ci and npm publish with NODE_AUTH_TOKEN from secrets.GITHUB_TOKEN.

Written for commit a3e3577. Summary will update on new commits. Review in cubic

@stackblitz-staging
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github Ready Ready Preview, Comment May 16, 2026 11:34pm

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add npm package publishing workflow to GitHub Actions

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add GitHub Actions workflow for automated npm package publishing
• Trigger on release creation with build and test steps
• Publish to GitHub Packages registry with proper permissions
Diagram
flowchart LR
  release["Release Created"] --> build["Build Job<br/>Node 20<br/>npm ci & test"]
  build --> publish["Publish Job<br/>npm publish to<br/>GitHub Packages"]
  publish --> registry["GitHub Packages<br/>Registry"]
Loading

Grey Divider

File Changes

1. .github/workflows/npm-publish-github-packages.yml ⚙️ Configuration changes +36/-0

GitHub Actions workflow for npm package publishing

• Create new GitHub Actions workflow triggered on release creation
• Build job runs tests using Node.js 20 with npm ci and npm test
• Publish job publishes package to GitHub Packages registry
• Configure proper permissions for packages write access
• Use GITHUB_TOKEN secret for npm registry authentication

.github/workflows/npm-publish-github-packages.yml


Grey Divider

Qodo Logo

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c9ba1d5-dd90-4382-aa4a-6b4d186bd935

📥 Commits

Reviewing files that changed from the base of the PR and between aab0937 and a3e3577.

📒 Files selected for processing (1)
  • .github/workflows/npm-publish-github-packages.yml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added automated testing and package publishing workflow via GitHub Actions on release events using Node.js 20.

Walkthrough

A new GitHub Actions workflow published npm packages to GitHub Packages on release creation. The workflow triggers on release events, runs build and test verification on Node.js 20, and conditionally publishes to the GitHub Packages registry using authenticated credentials from secrets.GITHUB_TOKEN.

Changes

GitHub Packages Publishing Workflow

Layer / File(s) Summary
Workflow trigger and metadata
.github/workflows/npm-publish-github-packages.yml
Workflow is named "Node.js Package" and is triggered by GitHub release creation events.
Build and test verification
.github/workflows/npm-publish-github-packages.yml
Build job runs on ubuntu-latest, sets up Node.js 20, installs dependencies with npm ci, and runs tests with npm test before publishing is allowed.
Publishing to GitHub Packages
.github/workflows/npm-publish-github-packages.yml
Publish job waits for build job completion, configures the npm registry endpoint to GitHub Packages (https://npm.pkg.github.com/), sets permissions for package publishing, and publishes using npm publish with authentication via NODE_AUTH_TOKEN from secrets.GITHUB_TOKEN.

Sequence Diagram

sequenceDiagram
  participant Developer
  participant GitHub as GitHub Release Event
  participant BuildJob as Build Job
  participant PublishJob as Publish Job
  participant Registry as GitHub Packages Registry

  Developer->>GitHub: Create release
  GitHub->>BuildJob: Trigger workflow
  BuildJob->>BuildJob: npm ci (install dependencies)
  BuildJob->>BuildJob: npm test (run tests)
  BuildJob-->>PublishJob: Build complete
  PublishJob->>PublishJob: Configure npm registry
  PublishJob->>Registry: npm publish with NODE_AUTH_TOKEN
  Registry-->>PublishJob: Package published
Loading

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A workflow hops into view,
Tests run first—a safety check true!
When releases dance, the publish takes flight,
To GitHub Packages, packages so bright!
Automation's whiskers twitch with delight! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deargvp1-patch-1

Comment @coderabbitai help to get the list of available commands and usage tips.

@deargvp1 deargvp1 merged commit 0dde61f into master May 16, 2026
8 of 10 checks passed
@deargvp1 deargvp1 self-assigned this May 16, 2026
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