Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 17, 2025

This PR implements automated NPM publishing for the node-dijkstra repository using GitHub Actions. The solution provides a secure, quality-gated release process that activates whenever a new GitHub release is published.

Changes Made

🚀 GitHub Actions Workflow

Added .github/workflows/release.yml that:

  • Triggers automatically on GitHub release publication
  • Uses Node.js 18.x for compatibility with modern NPM
  • Runs the full test suite before publishing to ensure code quality
  • Publishes to NPM using secure NPM_TOKEN authentication
  • Uses latest GitHub Actions (checkout@v4, setup-node@v4) for security and reliability

📚 Documentation Updates

  • README.md: Added "Releases" section explaining the automated release process
  • CHANGELOG.md: Created changelog documenting version updates and dependency changes

📦 Version Update

  • package.json: Bumped version from 2.5.0 to 2.5.1
  • CHANGELOG.md: Added entry for v2.5.1 explaining dependency updates with no breaking changes

Benefits

  • Automated Quality Gate: No package can be published without passing all tests
  • Secure Authentication: Uses GitHub secrets for NPM token management
  • Simplified Release Process: Maintainers only need to create GitHub releases
  • Zero Maintenance: Workflow runs automatically without manual intervention
  • Modern Best Practices: Uses current GitHub Actions and Node.js versions

Setup Required

To activate the automated releases, the repository owner needs to:

  1. Generate an NPM automation token at npmjs.com
  2. Add it as NPM_TOKEN secret in GitHub repository settings
  3. Create a GitHub release with tag v2.5.1 to trigger the first automated publish

Validation

  • ✅ All existing tests continue to pass (59 tests)
  • ✅ YAML syntax validated
  • ✅ NPM package structure verified with npm pack --dry-run
  • ✅ Workflow follows GitHub Actions security best practices
  • ✅ Version updated to 2.5.1 with proper changelog documentation

This implementation modernizes the release process while maintaining backward compatibility and ensuring no published package can bypass the test suite. The package is ready for v2.5.1 release.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 17, 2025 07:52
Co-authored-by: albertorestifo <1037048+albertorestifo@users.noreply.github.com>
Co-authored-by: albertorestifo <1037048+albertorestifo@users.noreply.github.com>
Copilot AI changed the title [WIP] Setup CI releases to NPM Setup CI releases to NPM with GitHub Actions workflow Sep 17, 2025
Copy link
Owner

@albertorestifo albertorestifo left a comment

Choose a reason for hiding this comment

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

@copilot can you bump the version in the package.json to 2.5.1 and create the changelog entry explaining some dependecies have been updated, no breaking changes.

Co-authored-by: albertorestifo <1037048+albertorestifo@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 17, 2025

@copilot can you bump the version in the package.json to 2.5.1 and create the changelog entry explaining some dependecies have been updated, no breaking changes.

Updated package.json version to 2.5.1 and created CHANGELOG.md with entry documenting dependency updates and no breaking changes. Changes made in commit d4dac3f.

Copilot AI changed the title Setup CI releases to NPM with GitHub Actions workflow Setup CI releases to NPM with GitHub Actions workflow and version 2.5.1 Sep 17, 2025
@albertorestifo albertorestifo marked this pull request as ready for review September 17, 2025 08:01
@albertorestifo albertorestifo merged commit f2af17e into master Sep 17, 2025
4 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