semantic-release / git

:twisted_rightwards_arrows: semantic-release plugin to commit release assets to the project's git repository
MIT License
295 stars 66 forks source link

update documentation to more clearly discourage use of this plugin #477

Open travi opened 1 year ago

travi commented 1 year ago

this plugin works great for release workflows that truly need to make commits during the release process, but we want to make it more clear to users that enables releases without the need to make commits. this is the reason why this plugin in not included by default in the core package:

including commits as part of the release process adds complexities like:

seebeen commented 1 year ago

Working on it 😊

sheerlox commented 10 months ago

As I generally want my git repository to be the source of truth for everything, I highly value having my version number in package.json up-to-date, and I also prefer using a CHANGELOG over GitHub releases: these features were even what brought me to semantic-release ~ 5 years ago since the company I worked at was not publishing anything to NPM, but we were loading the version number from package.json in our codebases for reporting purposes (debugging/monitoring and displaying to end-users), and we also used CHANGELOGs as references for technical, management and end-users reporting on development progress.

Keeping a CHANGELOG is generally a good standard, is platform-independent, and also has the benefit of being searchable directly from the IDE.

Fwiw I think it would be better to focus on:

travi commented 10 months ago

As I generally want my git repository to be the source of truth for everything, I highly value having my version number in package.json up-to-date

i have to get a little bit pedantic to clarify this detail. in this particular case, the git repository simply isn't the source of truth. it can be a source of mostly reliable information, but in the case of most recent version released, the actual registry is the actual source of truth and other sources, like the git repo, have to be synced with that source to be accurate. semantic-release does a great job under normal circumstances doing that syncing, but it is important to recognize that it isnt actually the source of truth. the reason this is important is that there are some failure scenarios that can leave the two sources out of sync, making the git source misleading and potentially unreliable.

Keeping a CHANGELOG is generally a good standard, is platform-independent, and also has the benefit of being searchable directly from the IDE.

no argument that there are benefits to maintaining a changelog. however, there usually is very little benefit to maintaining a changelog file and release notes in github releases. github releases are enabled by default in core and we dont make it very clear that you should consider disabling the github releases release notes if you choose to use a changelog instead.

  • if releasing multiple packages from the same repository is a concern, adding explicit support for monorepos could be an excellent feature to add, e.g. pushing only one release commit.

these are the types of complexities that continue to make us shy away from official support of monorepos, but are also the types of details that we would want to get right if we ever do pursue official support. we currently have no plans to invest in official support in the near or medium term and instead look to our community to expand on our core to support monorepos outside the official org.

in the end, the goal of this issue isnt to deprecate the git or changelog plugins, but instead discourage using them unless you truly want those behaviors in your project and are willing to deal with the extra complexity that is added to your project as a result. the additional complexity from including commits in the release process is significant and we need to at least make it more clear that including them is an important decision point and has tradeoffs worth considering. the added complexity also results in lots of support threads that could be avoided if our docs both made the decision more clear and provided more detailed information for folks that do chose to include commits in their releases despite our warnings.