ml5js / ml5-library

Friendly machine learning for the web! πŸ€–
https://ml5js.org
Other
6.49k stars 901 forks source link

DevOps: Integrate Release Drafter to automate releases and npm publish #1265

Closed joeyklee closed 2 years ago

joeyklee commented 2 years ago

Dear ml5 community,

I'm submitting a new issue. Please see the details below.

β†’ Step 1: Describe the issue πŸ“

Did you find a bug? Want to suggest an idea for feature?

I've never set this up myself, but I figure this is a good chance to try!

Progress

joeyklee commented 2 years ago

Oops, OK so https://github.com/ml5js/ml5-library/pull/1266 didn't run the npm publish task... looking into this now πŸ™ˆ

joeyklee commented 2 years ago

Oh yay this seems to be working! https://github.com/ml5js/ml5-library/actions/runs/1726425467 Fingers crossed πŸ˜‚

joeyklee commented 2 years ago

Oops seems like we need to fix how the auth token secret gets to that workflow: https://github.com/ml5js/ml5-library/runs/4890698033?check_suite_focus=true πŸ™ˆ

joeyklee commented 2 years ago

Updating this in the npm auth settings

Screen Shot 2022-01-20 at 5 13 59 PM
joeyklee commented 2 years ago

Hmm, I'm going to take a break, since I keep running into these errors here on the npm ci step: https://github.com/ml5js/ml5-library/runs/4891282431?check_suite_focus=true

It seems like it nearly worked earlier -- failing on npm publish so I'm not 100% sure why we're seeing this error pop up on package installation step 😒

I'll try to revisit this soon. In case anyone else has any ideas, I'd be happy to have help! TY!

joeyklee commented 2 years ago

Woohoo! it worked! https://github.com/ml5js/ml5-library/runs/4901877071?check_suite_focus=true

joeyklee commented 2 years ago

OK SO

Here's where we are at now: To make an ml5 release:

  1. make your feature PR
  2. make sure to tag it with one of the following in the PR:
    • SEMVER/patch
    • SEMVER/minor
    • SEMVER/major
  3. bump the package version number that matches the SEMVER/patch | SEMVER/minor | SEMVER/major
  4. run npm i <--- this makes sure your bumped package version makes it into the packagelock.json
  5. run npm run update:readme <----- captures the version bump in the readme
  6. run git add .
  7. run git commit -m "chore: bumps package"
  8. push this to your feature branch.

Once we merge the PR to main:

  1. simply go to the releases sidebar > Screen Shot 2022-01-21 at 12 58 26 PM
  2. go to the latest draft and click the edit button Screen Shot 2022-01-21 at 12 58 31 PM
  3. click: publish the release

Here's what's left for the next steps:

  1. automate the npm version tag number from the release-drafter into the workflow