Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions CI/CD with lerna and commitizen #952

Open
wants to merge 7 commits into
base: eleven
Choose a base branch
from
Open

Conversation

LeeMellon
Copy link

@LeeMellon LeeMellon commented Sep 17, 2020

Pull Request

Summary of Changes

Initial pass at setting up a CI/CD workflow with Github Actions, using to Semantic Versioning specifications. Adds Commitizen, .github/workflows. Upadtes README.md

  • Commitizen is providing a CLI for enforcing the Semantic Versioning specifications on all commits, and a changelog in each Lerna package. This will facilitate Lerna independently incrementing package version numbers based on the type of each commit message.

    • Major: X.0.0 when you make incompatible API changes, usually noted by answering yes to the "Breaking Changes" prompt.

    • Minor: 0.X.0 when you add functionality in a backwards compatible manner, most often using the "feat" type on a commit.

    • Patch: when you make backwards compatible bug fixes, noted with the "fix" type.

      TLDR @foo/bar is V1.0.0. You merge 3 commits (one "feat", two "fix") the result will be @foo/bar is updated to V1.1.2, and the changes will be noted in the package CHANGELOG.md

  • Github Actions is used here as a possible CI/CD solution. In /.github/workflows are two basic github workflows:

    • node.yml which runs test builds of the repo on 3 different versions of node (currently breaking on an unrelated issue).
    • publish.yml which runs a similar build on node 12, and then checks out the branch, looks at the commit history, sets up a git credentials (Which will need to be added. Specifically an authorized email), and calls the scripts for lerna to update all changed packages on the npm and git registries. It is set up to do this currently every time a branch is merged to eleven. I have tested this on NPM in a personal public repo, but I have not tested with the github repository as it seems more difficult to remove things/test from. This file is currently commented out as it is still a WIP, still requires an authorized email address, and we probably aren't ready to be publishing things yet anyway.

@LeeMellon LeeMellon changed the title Github Actions CI/CD with lerna and conmmitizen Github Actions CI/CD with lerna and commitizen Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants