openedx / wg-frontend

Open edX Frontend Working Group
4 stars 0 forks source link

Update CI workflow for repositories that release to NPM via semantic-release to include preview of new release version #84

Closed adamstankiewicz closed 1 year ago

adamstankiewicz commented 2 years ago

We somewhat recently standardized on using conventional commits across all Open edX repositories. For frontend repos that use semantic-release to publish packages to NPM, we've been using conventional commits all along. However, by default, semantic-release only releases to NPM on breaking changes, reverts, fix, feat, and perf as denoted here and here.

This is not immediately obvious to engineers who are not as familiar with semantic-release, who may have the expectation that commit types chore, build, docs, etc. should also trigger an NPM release, which is not the case. We have had several instances where a PR was merged, but the PR author wasn't aware their changes

In some repos that publish to NPM, we already include a preview step of what version will be published by semantic-release, if any, via the CI Github Actions workflow. For example, see the semantic-release dry run step in Paragon here. However, this CI step is not all that discoverable and you need to know of its existence, otherwise it's not clear it's there.

The ask in this issue is to find a way to automatically add a comment to the PR after the dry run of semantic-release returns the version for which it will publish, similar to how semantic-release will add a comment to PRs once it has been successfully published. This will make it significantly more obvious when there are issues related to the commit message that could impact its NPM release upon merge.

We should identify all the repositories that use semantic-release to publish to NPM, and update their CI workflows accordingly to generate a PR comment containing a preview of what version will be published upon merge.

arbrandes commented 1 year ago

Closing as a duplicate of https://github.com/openedx/wg-frontend/issues/139