eslint-plugin-eslint-plugin icon indicating copy to clipboard operation
eslint-plugin-eslint-plugin copied to clipboard

chore(CI): add automatic release

Open MichaelDeBoey opened this issue 2 years ago • 7 comments

@eslint-community/eslint-tsc In order to make the automatic release work, we should add the NPM_TOKEN secret in the Action secret settings.

I think it's best to set a PAT for the eslint-community-bot npm user btw.


This branch depends on #313

Closes #301


This PR is inspired by what I did for @mysticatea/eslint-plugin in https://github.com/eslint-community/mysticatea__eslint-plugin/pull/8

MichaelDeBoey avatar Oct 12 '22 02:10 MichaelDeBoey

I added an npm automation token as NPM_TOKEN at the organization level. To be safe it’s not enabled for any repos. You can enable it just for the repos that need it.

nzakas avatar Oct 12 '22 17:10 nzakas

@MichaelDeBoey how will the automatic releases work? When will they happen? And what if we want to do a single release with multiple changes?

bmish avatar Oct 12 '22 17:10 bmish

I added an npm automation token as NPM_TOKEN at the organization level.

@nzakas Thanks! 🙏


how will the automatic releases work? When will they happen?

@bmish semantic-release will take care of the release on every commit that's done to the main/next/alpha/beta branch It will look at the commit message & release a patch version for fix, a minor version for feat & a major version for every commit that has a BREAKING CHANGE in their body More info on how they work, can be found at:

  • https://github.com/semantic-release/semantic-release#how-does-it-work
  • https://github.com/semantic-release/semantic-release#triggering-a-release

what if we want to do a single release with multiple changes?

You can create pre-releases when pushing to the alpha/beta branch. Each commit will still be released, but not for people who install the package normally, only for people who use the -alpha.X/-beta.X suffix or alpha/beta token (like npm install eslint-plugin-eslint-plugin@alpha). Have a look at how this is working for testing-library-eslint-config:

  • https://github.com/testing-library/eslint-plugin-testing-library/releases
  • https://www.npmjs.com/package/eslint-plugin-testing-library?activeTab=versions

MichaelDeBoey avatar Oct 13 '22 00:10 MichaelDeBoey

Should we add the github badge so people know things will be released automatically? https://github.com/semantic-release/semantic-release#badge

bmish avatar Oct 13 '22 13:10 bmish

Should we get rid of release-it at this point to avoid having multiple systems in place for releasing? Added here: https://github.com/eslint-community/eslint-plugin-eslint-plugin/pull/131

bmish avatar Oct 13 '22 13:10 bmish

Is this compatible with the conventional commits we currently use? https://github.com/eslint-community/eslint-plugin-eslint-plugin/pull/221

bmish avatar Oct 13 '22 13:10 bmish

Should we add the github badge so people know things will be released automatically?

Was going to cleanup the badges in a separate PR

Should we get rid of release-it at this point to avoid having multiple systems in place for releasing?

Indeed a good idea to remove it

Is this compatible with the conventional commits we currently use?

Yes it very much is! The docs I referenced are even mentioning commitizen & commitlint

Tools such as commitizen or commitlint can be used to help contributors and enforce valid commit messages.

MichaelDeBoey avatar Oct 13 '22 15:10 MichaelDeBoey