loopbackio / loopbackio/loopback-next

Spike: automated release process

Open
#2,302 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Internal Tooling needs grooming spike
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

At the moment, our process for releasing and publishing new versions is based on manual invocation of lerna CLI on a local developer machine, which comes with few issues:

  • it requires admin permissions on GitHub because it pushes directly to master
  • we are publishing from "dirty" git checkout that may contain extra files when compared to what is committed to git
  • the releases are not peer-reviewed, only the person making the release can preview the changes

I would like us to improve this process and make it more automated. I am envisioning the following setup:

  • The person initiating the release:
    • creates a new feature branch
    • runs lerna version --no-git-tag-version --no-push to bump up versions, update changelogs and create the release commit.
    • pushes the feature branch to GitHub and opens a new pull request.
  • When the PR is approved, the release commit is merged to master in the usual way. No admin permissions are required.
  • A build pipeline (powered e.g. by Azure Pipelines or GitHub Actions) detects a release commit and
    • Creates appropriate git tags (unfortunately, this is not supported by Lerna as of 2018-01-29)
    • Runs lerna publish from-git to publish packages to the npm registry

@strongloop/loopback-maintainers thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the manual Lerna release process and the proposed lerna version --no-git-tag-version --no-push flow. Define how a merged release commit is detected, git tags are created, and lerna publish from-git runs in the build pipeline; done means releases are peer-reviewed and publishing no longer requires local admin access.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
build-system, ci-cd, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.