![]() ![]() We can the that the semantic-release module pushed a release commit and a new tag. Release time ! #Īdd a feat commit on the project and let the magic happens. This variable will be used by the semantic-release module. In the Variables section, create a variable named GITLAB_TOKEN with the previous generated token. Go to Settings -> CI/CD pages to define a private variable. Run the following command to add semantic-release dependencies :Ĭreate a personal access token with API scope from your profile page (see GitLab documentation : ). ![]() Install semantic-release and dependencies # BREAKING CHANGE: commit will produce a major version.feat: commit will produce a minor version.fix: commit will produce a patch version.A breaking change will be a major version x.0.0Ĭonventional commits specification permit to associate a commit type to a semantic versioning rule.A feature will be a minor version 0.x.0.The semantic versioning (SemVer) rules permit to define the next software version. The semantic-release module automates the package releases and apply semantic versioning based on conventional commits. Reminder on conventional commits and semantic versioning # Let’s automate this with the semantic-release module. Our project can now publish its versions to the GitLab package registry, but we still need to set the version by hand. Releases and Changelog automation with semantic-release # If you click on the version entry, you will retrieve the build informations and the registry setup to use the module in your projects. You should now have a new entry in the package page. Now, go to the package registry page (left side bar). The version is published in the GitLab project package registry. We can see that the publish job works well. With this configuration, every commit on the main branch will trigger a pipeline like the following : The pipeline is only triggered on main branch commits.The publish job declared on the release stage run the publish module action.The default part install node modules from cache (if exists) and setup.if: $CI_COMMIT_BRANCH = $CI_DEFAULT_BRANCH ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |