Skip to content

refactor(ci): Updated the publish command in the CI to use npm publish instead of lerna publish #4195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

sdangol
Copy link
Contributor

@sdangol sdangol commented Jul 22, 2025

Summary

This PR updates the make-release and publish-package Github workflows to switch from using publish commands from lerna to the native npm publish command to publish the packages to the npm registry.

Changes

  • Updated the lerna publish command to npm publish in the make-release.yml and publish-package.yml Github workflows
  • For generating provenance statements, the --provenance flag was used
  • The from-package from lerna was removed as npm publish uses the --workspaces flag to publish all the workspaces which are not marked as private. If a package with the same version is tried to be published, it will throw an error
  • To publish an individual package through publish-package.yml, the --workspace <workspace-path> was used

Issue number:
#4171


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Jul 22, 2025
@boring-cyborg boring-cyborg bot added the automation This item relates to automation label Jul 22, 2025
@sdangol sdangol self-assigned this Jul 22, 2025
Copy link

@sdangol sdangol requested a review from dreamorosi July 22, 2025 16:32
@dreamorosi dreamorosi linked an issue Jul 22, 2025 that may be closed by this pull request
2 tasks
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thank you for the work on this PR and for the tests in the issue!

We can address this either in this PR or in the PR we'll open for #4170, but in L72 of the make-release workflow we're reading the version number from the lerna.json file, which will be removed/no longer updated.

To replace that line I'd consider reading the version from packages/commons/package.json since it'll always be updated.

@sdangol
Copy link
Contributor Author

sdangol commented Jul 22, 2025

Yeah, let's do that in the PR that we open next which probably would remove all the lerna dependencies as well.

@dreamorosi dreamorosi merged commit 97dedf0 into main Jul 22, 2025
54 checks passed
@dreamorosi dreamorosi deleted the refactor/publish branch July 22, 2025 17:33
Copy link
Contributor

@aws-powertools/lambda-typescript No related issues found. Please ensure 'pending-release' label is applied before releasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: move away from lerna publish command
2 participants