Skip to content

Release Setup

Audrey Eschright edited this page Jan 10, 2019 · 16 revisions

Setting up to do releases

I use a separate clone from my usual working copy for the purposes of releases:

git clone git@github.com:npm/cli.git npm-release

Only allow fast forward on pull– this stops pull's default to merging when it can't do this. We never want merges and if your master branch is out of sync with origin/master then you can fix that with git fetch origin ; git reset --hard origin/master

git config pull.ff only

Similarly, we only merge branches that have been rebased on to master. This means they MUST be able to fast forward on to master. While merging would fast forward by default, this stops accidental merge commits from happening.

git config merge.ff only

And finally, this gets us refs for pull requests which makes them a lot easier to deal with:

git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"

You'll also need a copy of the docs repo:

git clone git@github.com:npm/help-docs.git

Don't forget to install the dependencies:

npm install

Signing Key

You need a GPG key to sign releases with. We've been using https://keybase.io/ to store/verify our public keys.

In order to sign the release tags, you will need to set this also: npm config set sign-git-tag true

Setting up for Node.js

To send pull requests with the new npm you'll need clones of the legacy Node.js:

git clone git@github.com:npm/node.git -o npm release-node

And in release-node:

git remote add downstream git@github.com:nodejs/node.git