Skip to content
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

🛠️ Repo: Switch automations to GitHub Actions (GHA) #4117

Open
craigtaub opened this issue Dec 3, 2019 · 8 comments
Open

🛠️ Repo: Switch automations to GitHub Actions (GHA) #4117

craigtaub opened this issue Dec 3, 2019 · 8 comments
Labels
core-team issues which must be handled by Mocha's core team status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc. type: feature enhancement proposal

Comments

@craigtaub
Copy link
Contributor

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:

  1. NPM release
  2. Documentation website release (See https://github.com/netlify/actions)

Note only mocha repository collaborators will have permission create workflows.

@craigtaub craigtaub added type: feature enhancement proposal type: chore generally involving deps, tooling, configuration, etc. nice to have enhancement proposal of low priority core-team issues which must be handled by Mocha's core team labels Dec 3, 2019
@boneskull
Copy link
Contributor

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.

@craigtaub
Copy link
Contributor Author

craigtaub commented Dec 3, 2019

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.

@outsideris
Copy link
Contributor

We can use Actions to trigger Netlify( #3644 ) and replace AppVeyor for windows testing ( #4013 )

@juergba
Copy link
Contributor

juergba commented Jan 12, 2020

Regarding publishing and 2FA: could Wombat evtl. be a solution?

@cspotcode
Copy link
Contributor

cspotcode commented Jan 18, 2020

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

@juergba
Copy link
Contributor

juergba commented Jan 18, 2020

@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?

@cspotcode
Copy link
Contributor

cspotcode commented Jan 18, 2020 via email

@mochajs mochajs deleted a comment from ssbarnea Feb 1, 2022
@JoshuaKGoldberg JoshuaKGoldberg changed the title Investigate using Github actions 🛠️ Repo: Switch automations to GitHub Actions (GHA) Dec 27, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Mocha can use your help with this one! and removed nice to have enhancement proposal of low priority labels Feb 6, 2024
@msimerson
Copy link

msimerson commented Feb 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-team issues which must be handled by Mocha's core team status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc. type: feature enhancement proposal
Projects
None yet
Development

No branches or pull requests

7 participants