p5.js
p5.js copied to clipboard
npm run release preview actually does a (mostly) real release
I ran npm run release -- --preview today to do a test run of the 1.3.1 release, but it did a (mostly) real release. It did everything for an actual release except upload the new library version to bower. I was able to finish the release properly, so no actual harm except for the surprise of doing a release :)
The docs here say that the preview flag will not touch anything official, so we could remove that from the docs and/or fix whatever underlying logic has changed to make that no longer true.
This line should have prevented the release from actually releasing. I'll have a look but if you have any inkling of what may have happened do let me know as well.
Ok, I found the problem. The --preview flag for np is added in 6.2.0 of np (which was the lastest version when it was added) but it had issues with NPM 2FA so it was downgraded to 5.2.1 here which doesn't have the 2FA issue but also doesn't support the --preview flag.
The current latest version is 7.4.0. I'm not sure if the 2FA problem still persists, I'll test it out in a scoped release.
I've tested out the latest version but is unable to publish to my namespace (got stuck at 2FA where it keeps asking for the token repeatedly). I'm not sure if it would be the same case for non-namespaced packages as well, I have a few projects published to NPM using np and 2FA without problems but I'm publishing to non-namespaced package and probably not using 7.4.0 yet.
@outofambit I wonder if it would be a good idea to move the publishing steps to Github Actions like we did for the website and to create a new release we just do npm version patch etc and git push && git push --tags?
I wonder if it would be a good idea to move the publishing steps to Github Actions like we did for the website and to create a new release we just do npm version patch etc and git push && git push --tags?
gonna take a look at this soon! i hit the same scenario in publishing 1.4 because i forgot we hadn't fixed this yet.
This is a larger change, but if the p5 team is interested in automating the process of version bumping, updating the changelog, and publishing the package to NPM, you might be interested in semantic-release or auto projects. A recent reference diff using auto inside a GitHub action is here:
https://github.com/nteract/data-explorer/pull/63
I think we can close this issue now since we have updated the release process. What do you think, @outofambit and @limzykenneth?
yeah i think so! no longer a problem thanks to @limzykenneth! 🙌