Skip to content

Add GitHub Actions workflow for package publishing#13

Merged
naheel0 merged 4 commits intomainfrom
package
Feb 27, 2026
Merged

Add GitHub Actions workflow for package publishing#13
naheel0 merged 4 commits intomainfrom
package

Conversation

@naheel0
Copy link
Copy Markdown
Member

@naheel0 naheel0 commented Feb 27, 2026

🚀 BΞYTΞFLʘW | Pull Request Protocol

PR Type: (Choose one: feat | fix | refactor | docs | perf)
Issue Link: Fixes #


📝 System Summary

Provide a concise brief of the changes introduced to the stream.

🛠️ Technical Changes

  • Logic change in ...
  • New UI component added: ...
  • Database schema updated: ...

🧪 Quality Assurance (QA)

  • Linting: Code style matches the BeyteFlow grid.
  • Build: npm run build executed without errors.
  • Testing: New logic has been verified and tested.
  • Dark Mode: UI is high-contrast and neon-optimized.

🖼️ Visual Evidence

If this PR affects the UI, drop a screenshot or GIF below:


📡 Developer Authorization

  • I have performed a self-review of my code.
  • My changes generate no new warnings in the console.
  • I have updated the documentation (if applicable).

Authorized by: @naheel0
Timestamp: {{ 27/2/2026 }}


Summary by CodeRabbit

  • Chores
    • Added an automated workflow to publish the package to npm on tagged releases (v*). The pipeline publishes publicly on tagged pushes, runs in a consistent Node environment, installs dependencies, and performs the publish step using secure authentication to ensure reliable, repeatable releases.

@github-actions github-actions bot added the ci/cd label Feb 27, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between faec50e and 1690ca6.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow .github/workflows/publish.yml named "Publish Package" that triggers on pushed tags matching v*. The workflow runs on Ubuntu, checks out the repo, sets up Node.js 24, installs dependencies with npm ci, and publishes the package using the NPM_TOKEN secret.

Changes

Cohort / File(s) Summary
CI/CD Workflow
.github/workflows/publish.yml
New GitHub Actions workflow triggering on push tags v*; checks out code, configures Node.js v24 and npm registry, runs npm ci, and publishes package with NPM_TOKEN authentication.
sequenceDiagram
    participant Git as GitHub repo
    participant Actions as GitHub Actions Runner
    participant NPM as npm Registry

    Git->>Actions: push tag "vX.Y.Z" (trigger)
    Actions->>Actions: checkout code\nsetup Node.js v24\ninstall deps (npm ci)
    Actions->>NPM: authenticate using NPM_TOKEN
    Actions->>NPM: publish package (npm publish --access public)
    NPM-->>Actions: publish response (success/failure)
    Actions-->>Git: workflow status (success/failure)
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 I hopped on a tag and gave a cheer,
Pushes set free a publish frontier.
Node 24 hums, npm sends a cheer,
Packages soar — automation's near! 📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a GitHub Actions workflow file for publishing packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/publish.yml (1)

18-20: Switch to npm trusted publishing (OIDC) instead of long-lived NPM_TOKEN.

Lines 18-20 use a persistent npm token, which has weaker security properties. npm officially supports trusted publishing via OIDC with GitHub Actions, allowing keyless authentication. Update the workflow to:

  1. Configure a trusted publisher on npmjs.com (Settings → Trusted Publisher → GitHub Actions, entering your owner, repo, and publish.yml)
  2. Add permissions: {contents: read, id-token: write} to the job
  3. Remove the NODE_AUTH_TOKEN env var and use npm publish (no extra flags needed; ensure npm CLI is v11.5.1+)
  4. Only use GitHub-hosted runners (self-hosted runners do not work with OIDC)

This requires npmjs.com configuration in addition to workflow changes—the code changes alone won't enable OIDC authentication.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/publish.yml around lines 18 - 20, Update the publish
workflow to use GitHub Actions OIDC trusted publishing: configure a Trusted
Publisher on npmjs.com for your owner/repo and the publish workflow, then in the
publish job add permissions: { contents: read, id-token: write } to the job
definition, remove the NODE_AUTH_TOKEN env entry used with the npm publish step
(keep the npm publish invocation but without extra env), ensure the workflow
uses GitHub-hosted runners (not self-hosted) and that the runner has npm CLI
v11.5.1+ installed so OIDC auth works.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/publish.yml:
- Line 15: Update the CI runtime under the node-version key in the GitHub
Actions publish workflow by replacing the current value "18" with an active LTS
such as "24" (or "22" if you prefer), ensuring the node-version entry reflects
the new LTS to restore supported runtime; leave the rest of the publish.yml
workflow unchanged.
- Around line 12-13: Update the GitHub Actions steps referencing
actions/checkout@v3 and actions/setup-node@v3 to their v4 releases: change uses:
actions/checkout@v3 → actions/checkout@v4 and uses: actions/setup-node@v3 →
actions/setup-node@v4; also verify the setup-node step's node-version (or
node-version-file) is set to a supported runtime (e.g., "20") or omitted to
default to Node 20 so the runner is compatible with current GitHub-hosted
images.

---

Nitpick comments:
In @.github/workflows/publish.yml:
- Around line 18-20: Update the publish workflow to use GitHub Actions OIDC
trusted publishing: configure a Trusted Publisher on npmjs.com for your
owner/repo and the publish workflow, then in the publish job add permissions: {
contents: read, id-token: write } to the job definition, remove the
NODE_AUTH_TOKEN env entry used with the npm publish step (keep the npm publish
invocation but without extra env), ensure the workflow uses GitHub-hosted
runners (not self-hosted) and that the runner has npm CLI v11.5.1+ installed so
OIDC auth works.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc5dd62 and faec50e.

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

@naheel0
Copy link
Copy Markdown
Member Author

naheel0 commented Feb 27, 2026

@copilot Verify each finding against the current code and only fix it if needed.

In @.github/workflows/publish.yml around lines 12 - 13, Update the GitHub
Actions steps referencing actions/checkout@v3 and actions/setup-node@v3 to their
v4 releases: change uses: actions/checkout@v3 → actions/checkout@v4 and uses:
actions/setup-node@v3 → actions/setup-node@v4; also verify the setup-node step's
node-version (or node-version-file) is set to a supported runtime (e.g., "20")
or omitted to default to Node 20 so the runner is compatible with current
GitHub-hosted images.

Verify each finding against the current code and only fix it if needed.

In @.github/workflows/publish.yml at line 15, Update the CI runtime under the
node-version key in the GitHub Actions publish workflow by replacing the current
value "18" with an active LTS such as "24" (or "22" if you prefer), ensuring the
node-version entry reflects the new LTS to restore supported runtime; leave the
rest of the publish.yml workflow unchanged.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

@naheel0 I've opened a new pull request, #14, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 27, 2026 06:57
Co-authored-by: naheel0 <191262736+naheel0@users.noreply.github.com>
chore: bump publish workflow to actions v4 and Node 24
@naheel0 naheel0 merged commit 959f79f into main Feb 27, 2026
5 checks passed
@naheel0 naheel0 deleted the package branch February 27, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants