green-code-initiative / ecoCode-javascript

Reduce the environmental footprint of your JS/TS software programs
https://ecocode.io
GNU General Public License v3.0
21 stars 18 forks source link

Releasing and publishing process #3

Closed utarwyn closed 1 year ago

utarwyn commented 1 year ago

This PR aims to create workflows and update documentation to release and publish the next version of a linter plugin. It contains the following elements:

Release workflow

This monorepo uses deferred versionning of Yarn release workflow to operate. This script allows any authorized maintainer to manually run the next release iteration of a specific linter plugin. It is automatic and performs the following operations for the selected linter:

  1. Apply version defined for this release iteration (see explanation below)
  2. Check if the version has not been released yet
  3. Extract and update release notes in CHANGELOG.md of the plugin
  4. Commit version bump and updated release notes (example here)
  5. Push a release and a tag to the repository (example here)
  6. Publish the created package on npmjs.com and GitHub Packages

I have done a lot of tests on this process to make sure it is stable and functional. You can check an example of the complete script execution here.

"check_version" workflow

As defined in the release process, this script ensures that a new version has been chosen (major, minor or patch) when a PR is opened. Thanks to this, each contributor has the control over the new version that will be generated by his development. The maintainers can check during the PR review whether the desired version bump corresponds to the development.

In this PR, I have asked Yarn to release a minor version in the next release iteration (check file .yarn/versions/0a63a0fb.yml).

And also..

There is also an updated README and a configuration file to ignore some files in the npm package.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

utarwyn commented 1 year ago

Did you have time to read this PR @dedece35? Sorry for the re-mention. I'll need it to publish a first version of the linter and make a test project that uses it.