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

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

Closed
3 of 4 tasks
joeyklee opened this issue Jan 20, 2022 · 7 comments Β· Fixed by #1276
Closed
3 of 4 tasks

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

joeyklee opened this issue Jan 20, 2022 · 7 comments Β· Fixed by #1276
Assignees
Labels

Comments

@joeyklee
Copy link
Contributor

joeyklee commented Jan 20, 2022

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?

  • This is a devOps ticket to integrate release drafter: https://github.com/release-drafter/release-drafter
  • The goal is to use github actions to automate publishing our NPM package when we tag a release in Github.
  • The hope is that this will make it easier to tag releases and make more frequent and smaller releases of the library. This way we no longer have to do this via the terminal among other parts of the process that are error prone -- e.g. having to update version numbers in our package json and elsewhere!

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

Progress

  • Installed release-drafter on the ml5-library
  • define actions yaml
  • setup tags
  • TBD...
@joeyklee joeyklee self-assigned this Jan 20, 2022
joeyklee added a commit that referenced this issue Jan 21, 2022
feat: #1265 Integrate release drafter for automating releases
@joeyklee
Copy link
Contributor Author

Oops, OK so #1266 didn't run the npm publish task... looking into this now πŸ™ˆ

@joeyklee
Copy link
Contributor Author

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

@joeyklee
Copy link
Contributor Author

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
Copy link
Contributor Author

Updating this in the npm auth settings

Screen Shot 2022-01-20 at 5 13 59 PM

joeyklee added a commit that referenced this issue Jan 21, 2022
@joeyklee joeyklee reopened this Jan 21, 2022
@joeyklee
Copy link
Contributor Author

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
Copy link
Contributor Author

@joeyklee
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant