mocha
mocha copied to clipboard
🛠️ Repo: Switch automations to GitHub Actions (GHA)
Can we make some of the manual processes which are time consuming (and limited to those with an OS which can run the required tasks) automated via Githubs actions?
Look at:
- NPM release
- Documentation website release (See https://github.com/netlify/actions)
Note only mocha repository collaborators will have permission create workflows.
release might be problematic. we should be using npm's 2FA, which--last time I checked--means a machine cannot publish. I'll poke around and see what that looks like.
tbh, I'm interested in moving the entire build to GH actions. I've been using it in my other projects, and it's nice & fast. not sure what the SauceLabs integration looks like though.
I'll poke around and see what that looks like.
Thanks man. In fact that sounds likely 😔. Let's break it down and see where the issues are.
We can use Actions to trigger Netlify( #3644 ) and replace AppVeyor for windows testing ( #4013 )
Regarding publishing and 2FA: could Wombat evtl. be a solution?
Moving to Github Actions means running everything in docker, which conveniently means a consistent environment for running stuff locally, too. So e.g. folks on Windows can publish as long as they have docker installed.
For publishing, you can tell npm to publish a pre-built tarball
https://docs.npmjs.com/cli/publish
This means Github Actions could do the entire build, version bump, prepare the release notes, push git tags, then post the tarball for a maintainer to publish. The maintainer would run a (dockerized) publication script on their machine that downloads the tarball from Github and runs npm publish downloaded-tarball.tar.gz
@cspotcode Interesting.
On my Windows I have WSL2.0 / Ubuntu / VSCode WSL-extension installed. As an alternative to your docker solution, I just need to install npm on Ubuntu side, then I could run npm publish downloaded-tarball.tar.gz
. Right?
Even on Windows without WSL, that should work correctly.
On Sat, Jan 18, 2020, 1:41 AM Juerg B. [email protected] wrote:
@cspotcode https://github.com/cspotcode Interesting. On my Windows I have WSL2.0 / Ubuntu / VSCode WSL-extension installed. As an alternative to your docker solution, I just need to install npm on Ubuntu side, then I could run npm publish downloaded-tarball.tar.gz. Right?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mochajs/mocha/issues/4117?email_source=notifications&email_token=AAC35OHG7VAVXVLCYEJXHH3Q6KQCLA5CNFSM4JUU33GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJJR2IQ#issuecomment-575872290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC35ODOJIQB6JS6XJFKJADQ6KQCLANCNFSM4JUU33GA .
we should be using npm's 2FA, which--last time I checked--means a machine cannot publish.
Yes we should. And you can set up NPM with 2FA and still publish. You have to log into NPM with the publishing account and set up an Access Token
, which you save in GitHub as a secret. Then you configure a GHA as I've done in this example.