We need to update synchronize-with-npm action for the release workflow for bigtest by adding in monorepo support. But we have no tests setup for our actions yet? I know. But we also need a release workflow up and running for the bigtest update so this is better than nothing or being forced to manually publish.
Approach
Monorepo support for this action has already been implemented in resideo/actions so I copied over the latest version of that action and undid some of the resideo-specific configurations that were hard-coded.
What's new?
Below are the changes made to synchronize-with-npm:
This vs publish-release from @resideo/actions?
Removed remove_npmrc() as none of our projects require pushing a .npmrc file to the repository at the moment.
No longer manually authenticating for github package registry. By default, this action will use npm_token to authenticate for npmjs.
This vs the old synchronize-with-npm?
Monorepo support ⭐️
The action will do a git diff between the commit that triggered the action and the commit previous to that one and try and do a loop to publish all the packages that aren't filtered out through the various conditionals in the action.
Some of the conditionals include: if there are more than one package.json within that directory and sub-directories, if the directory falls under user-specified ignore argument, if the directory falls under the default ignore list (node_modules and .github), if the package.json is configured to be private
The old action that was specifically for single repositories used to tag the release with the version from the package.json. We can no longer do that as multiple packages will have different version numbers and the monorepo itself would not have a version number.
Motivation
We need to update
synchronize-with-npm
action for the release workflow forbigtest
by adding in monorepo support.But we have no tests setup for our actions yet?
I know. But we also need a release workflow up and running for the bigtest update so this is better than nothing or being forced to manually publish.Approach
Monorepo support for this action has already been implemented in
resideo/actions
so I copied over the latest version of that action and undid some of the resideo-specific configurations that were hard-coded.What's new?
Below are the changes made to
synchronize-with-npm
:This vs
publish-release
from@resideo/actions
?remove_npmrc()
as none of our projects require pushing a.npmrc
file to the repository at the moment.github package registry
. By default, this action will usenpm_token
to authenticate fornpmjs
.This vs the old
synchronize-with-npm
?package.json
within that directory and sub-directories, if the directory falls under user-specified ignore argument, if the directory falls under the default ignore list (node_modules and .github), if thepackage.json
is configured to beprivate
package.json
. We can no longer do that as multiple packages will have different version numbers and the monorepo itself would not have a version number.Todos AFTER this PR is merged
Todos BEFORE this PR is taken out of draft mode
mk/add-mono-rel
to confirm it publishes properly.npm view @package
to check if publishing was successful becausenpmjs.org
does not always update right away.