Skip to content

add publish workflow for this to publish to npm on tag creation#70

Merged
niteshsandal-merge merged 1 commit intomainfrom
nitesh/add-publish-workflow
Mar 11, 2026
Merged

add publish workflow for this to publish to npm on tag creation#70
niteshsandal-merge merged 1 commit intomainfrom
nitesh/add-publish-workflow

Conversation

@niteshsandal-merge
Copy link
Copy Markdown
Collaborator

@niteshsandal-merge niteshsandal-merge commented Mar 11, 2026

Description of the change

As title

Description here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

All PRs at Merge must be backed by an Asana ticket (except Develop -> Master PRs). Create one here, and then replace this line with the link. https://app.asana.com/0/1198991781422585/list

Checklists

Development

  • The code changed/added as part of this pull request has been covered with tests, or the description above explains how testing was performed

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or gif attached. Download "Kap" from the Mac App store for easy gif screen capture.

Copy link
Copy Markdown

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

Other comments (1)
  • .github/workflows/ci.yml (24-25) The workflow duplicates the build steps in both jobs. Consider using GitHub's artifact feature to share the build output between jobs to avoid rebuilding:
    1. In the compile job, add:
          - name: Upload build artifacts
            uses: actions/upload-artifact@v3
            with:
              name: build-output
              path: dist/  # Adjust this to your build output directory
    1. In the publish job, replace the build step with:
          - name: Download build artifacts
            uses: actions/download-artifact@v3
            with:
              name: build-output
              path: dist/  # Adjust this to your build output directory

💡 To request another review, post a new comment with "/windsurf-review".

Comment on lines +23 to +26
- uses: actions/setup-node@v6
- run: npm ci
- run: npm run build
- name: Publish to npm
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The workflow is missing npm authentication configuration. To publish to npm, you need to set up authentication using the NODE_AUTH_TOKEN secret. Consider adding this to your setup-node action in the publish job:

Suggested change
- uses: actions/setup-node@v6
- run: npm ci
- run: npm run build
- name: Publish to npm
- uses: actions/setup-node@v6
with:
registry-url: 'https://registry.npmjs.org'

And then add the NODE_AUTH_TOKEN to your publish step:

Suggested change
- uses: actions/setup-node@v6
- run: npm ci
- run: npm run build
- name: Publish to npm
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to this do we have these secrets set up?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

shouldn't be needed with OIDC

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The setup-node action is missing the node-version parameter. This could lead to inconsistent builds if GitHub Actions' default Node.js version changes. Consider specifying a version like:

Suggested change
- uses: actions/setup-node@v6
- uses: actions/setup-node@v6
with:
node-version: '18'

id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Similarly, the setup-node action in the publish job should specify a Node.js version for consistency:

Suggested change
- uses: actions/setup-node@v6
- uses: actions/setup-node@v6
with:
node-version: '18'

@@ -0,0 +1,37 @@
name: ci

on: [push]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this only be on push to main?

@@ -0,0 +1,37 @@
name: ci
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit shud we name this something else since its not in ci

@niteshsandal-merge niteshsandal-merge merged commit 37949d8 into main Mar 11, 2026
2 checks passed
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