Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 24, 2025

This PR adds a new GitHub workflow that automatically publishes the package to npm when a tag is pushed to the repository.

Changes Made

  • Added .github/workflows/publish.yml workflow file that:
    • Triggers only on tag pushes (any tag pattern)
    • Runs all CI steps before publishing: lint, build, test, and browser tests
    • Publishes to npm using the NPM_TOKEN repository secret
    • Uses modern GitHub Actions versions (checkout@v4, setup-node@v4)

Workflow Details

The publish workflow follows these steps:

  1. Checkout code - Uses actions/checkout@v4
  2. Setup Node.js 22 - Uses actions/setup-node@v4 with npm registry configuration
  3. Install dependencies - Runs npm install (including puppeteer for browser tests)
  4. Run linter - Executes npm run lint
  5. Build project - Executes npm run build
  6. Run tests - Executes npm test
  7. Run browser tests - Executes npm run test:browser
  8. Publish to npm - Runs npm publish with NPM_TOKEN authentication

The workflow ensures that all quality checks pass before publishing, maintaining the same CI standards as the existing nodejs.yml workflow.

Usage

Once the NPM_TOKEN repository secret is configured, the workflow will automatically publish to npm whenever a tag is pushed:

git tag v3.0.1
git push origin v3.0.1

Fixes #25.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.35/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: node install.mjs (http block)
  • https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.35/linux64/chrome-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add npm publish github workflow Add npm publish GitHub workflow for tag pushes Jun 24, 2025
Copilot finished work on behalf of Yukaii June 24, 2025 08:51
@Copilot Copilot AI requested a review from Yukaii June 24, 2025 08:51
@Yukaii Yukaii marked this pull request as ready for review June 24, 2025 09:26
@Yukaii Yukaii merged commit edf8d47 into main Jun 24, 2025
1 check 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.

Add npm publish github workflow
2 participants