Skip to content

chore: automate npm release workflow#5

Merged
1u1s4 merged 1 commit into
mainfrom
chore/release-automation-cleanup
Apr 10, 2026
Merged

chore: automate npm release workflow#5
1u1s4 merged 1 commit into
mainfrom
chore/release-automation-cleanup

Conversation

@1u1s4
Copy link
Copy Markdown
Owner

@1u1s4 1u1s4 commented Apr 10, 2026

Summary

  • fix repository.url in package.json to the canonical npm-friendly git URL
  • change release:patch, release:minor, and release:major to push the version bump commit and tag instead of publishing locally
  • document that GitHub Actions now handles npm publishing and GitHub Releases after a pushed v* tag
  • configure NPM_TOKEN in the repository secrets for automated publishing

Why

The package is already published on npm, but future releases should be fully automated and reproducible from the repository workflow instead of requiring a local manual npm publish.

Test Plan

  • npm test
  • npm run build

@1u1s4 1u1s4 merged commit dfe4c6d into main Apr 10, 2026
@1u1s4 1u1s4 deleted the chore/release-automation-cleanup branch April 10, 2026 21:25
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the release workflow to automate publishing via GitHub Actions by modifying the release scripts in package.json to push to the repository instead of publishing directly. The documentation in README.md was also updated to reflect this change. Feedback suggests using git push --follow-tags to avoid pushing unintended local tags and identifies a contradiction in the documentation that needs to be resolved.

Comment thread package.json
Comment on lines +44 to +46
"release:patch": "npm run test && npm version patch && git push origin HEAD && git push origin --tags",
"release:minor": "npm run test && npm version minor && git push origin HEAD && git push origin --tags",
"release:major": "npm run test && npm version major && git push origin HEAD && git push origin --tags",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using git push origin --tags is generally discouraged because it pushes all local tags to the remote repository, which may include unintended or temporary tags. A safer and more efficient approach is to use git push origin HEAD --follow-tags. This command pushes the current branch and only the annotated tags (such as the one created by npm version) that are reachable from the commits being pushed.

Suggested change
"release:patch": "npm run test && npm version patch && git push origin HEAD && git push origin --tags",
"release:minor": "npm run test && npm version minor && git push origin HEAD && git push origin --tags",
"release:major": "npm run test && npm version major && git push origin HEAD && git push origin --tags",
"release:patch": "npm run test && npm version patch && git push origin HEAD --follow-tags",
"release:minor": "npm run test && npm version minor && git push origin HEAD --follow-tags",
"release:major": "npm run test && npm version major && git push origin HEAD --follow-tags",

Comment thread README.md

Cada comando ejecuta tests, actualiza `version` y crea localmente el tag `vX.Y.Z`, luego publica el paquete.

El flujo recomendado ahora es automático: los scripts de release hacen `git push` del commit y del tag, y GitHub Actions publica a npm usando `NPM_TOKEN` y crea el GitHub Release.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The addition of this paragraph introduces a contradiction with line 67, which still states that the release commands publish the package locally ('luego publica el paquete'). Since the scripts in package.json have been updated to only push to the repository and rely on GitHub Actions for publishing, line 67 should be updated to remove the mention of local publishing to avoid confusion for users.

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