GithubHelp home page GithubHelp logo

blackironj / lerna-release-workflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonwa/lerna-release-workflow

0.0 0.0 0.0 275 KB

Create a semantic release workflow with Lerna, Conventional Commits and GitHub Actions

License: MIT License

JavaScript 100.00%

lerna-release-workflow's Introduction

Lerna Release Workflow

A basic Lerna monorepo with Yarn Workspaces, Conventional Commits and GitHub Actions workflow configuration to achieve fully automated package publishing to the GitHub Package Registry.

Create a new repository from this template

Click the Use this template button and provide the new repository details.

Getting Started

Let's start by setting up the new repository:

  1. Update the root package.json with your repository name and url.

  2. Modify the sample packages as needed and remember to update their package.json.

    NOTE: For a package to be releasable to GitHub Package Registry, it must be scoped to match the owner of the repository. The package name is optional, as long as it is unique under that scope. In addition, the repository.url field needs to be consistent in all package.json files.

  3. Run yarn bootstrap to bootstrap the packages. This will install all of their dependencies and links any cross-dependencies.

How it works

Each push to master branch will generate a version number, git tag, Conventional Changelog, release commit, pushing changes to the origin and publish to GitHub Package Registry.

Protected branches

If you're using the protected branches feature, you'll need a Personal Access Token because the GITHUB_TOKEN generate by the CI won't have enough permission (that's by design). You can generate one in your account settings and set it in the repository secrets.

You'll also need to modify your action to:

  • Use persist-credentials: false when checking out the branch;
  • Set the repository remote to https format with the newly generated token.
# ...
            - uses: actions/checkout@v3
              with:
                  persist-credentials: false
                  fetch-depth: 0
# ...
          - name: Config git user
              run: |
                  git config --global user.name "${{ github.actor }}"
                  git config --global user.email "${{ github.actor }}@users.noreply.github.com"
                  git remote set-url origin https://${{ github.actor }}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${{ github.repository }}
# ...

lerna-release-workflow's People

Contributors

blackironj avatar dependabot[bot] avatar jonwa avatar simonecorsi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.