So it will recognise "v3.1.2" but not “ 3.1.2". Semantic-release supports plugins, although by default it comes with the following four built-in: create or update the changelog file, and to push a release commit and tag to the git repo, we also needed to install two additional plugins: $ npm install -D Semantic-release can be installed in your project with a single command: $ npm install -save-dev semantic-release It follows the semantic versioning specification strictly, including: determining the next version number, generating the release notes, and publishing the package. Semantic-release is an NPM tool to automate the workflow to release an NPM package. So when we had to migrate the project to an Azure repo and pipeline for other reasons, we decided to add semantic-release as well. One of my colleagues from another team had been advocating semantic-release, and it had been used in other projects successfully for a while. Every time, we had to explain the process, even though we have a contribution.md file. The manual process to bump the version worked well enough in the beginning, but it did not scale well when people from other teams began to make contributions to the library. Publish a new version when the package version of the library is bumped, and tag the new version in Git.Run static analytics for code quality checking.Build the library project and the demo project.When new code was merged to the major branches, a build kicked in with the following steps: For each release there were some manual steps, including updating both the package version and the change-log file. 3.x.x (with Angular 11 as peer dependency).1.x.x (deprecated, with Angular 8 as peer dependency).master / 2.x.x (with Angular 8 as peer dependency).projects/ng-library/package.json // For the library projectĪt the time when our story started, the major branches in the repo were: We have a library built in Angular and there are two package.json files in the repo. There aren’t many such stories about semantic-release out there, so I think others may benefit from hearing my experiences. It’s also about some of the errors I encountered along the way, and how I resolved them. The story is about how I added semantic-release to an existing Angular library project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |