chore: make manual publishing a bit better#2666
chore: make manual publishing a bit better#2666maribethb merged 3 commits intoRaspberryPiFoundation:mainfrom
Conversation
BenHenning
left a comment
There was a problem hiding this comment.
Thanks @maribethb! Nice robustness improvement. I had a few thoughts on the documentation but broadly the changes LGTM.
scripts.md
Outdated
| This script will clone a copy of blockly-samples to a directory called `dist`, | ||
| run `npm ci`, then build and test all plugins. | ||
|
|
||
| Note that this script does not handle npm authentication. You will need to |
There was a problem hiding this comment.
Is this relevant for this script or more for the publish ones? Since prepare is just building and never touches npm, this feels out of place (and potentially concerning--as a developer I'm now wondering if it does interact with npm somehow).
I suggest clarifying this for the publish scripts that would presumably fail without this.
Separately, is there a particular set of actions a developer needs to take to mitigate this? It might be nice to clarify that here (or in its own section referenced by the other sections).
There was a problem hiding this comment.
There is more information about how to publish located within the team internal docs. It's there because it deals with authentication details that make more sense to host with the internal team processes.
Initially the prepare script did run npm login so that's why I added the note there, but you're right it doesn't make sense anymore. I rearranged the file a bit to add more details and deter people from trying to publish on the command line anyway.
The basics
The details
Resolves
Proposed Changes
npm loginstep from the prepare script since logging in no longer helps. You have to use an access token instead. I am updating some internal documentation about how to publish with more information.Reason for Changes
Makes publishing manually a bit less error-prone since you can't forget to run the step that builds.
Test Coverage
Ran
npm run publish:checkVersionsand ensured it works correctly. Did not try to publish manually though.Documentation
Updated scripts.md and I'm working on adding some internal documentation about how to publish.
Additional Information