Thanks for being willing to contribute!
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
- Fork and clone the repo
yarn install
to setup and validate your clone of the projectyarn build
to lerna link dependencies- Create a branch for your PR
- Create
.env
file in the root of the project and add environment variables (GATSBY_LOOKUP_API_URL) yarn docz:dev
to start gatsby components site for components development
Tip: Keep your
master
branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:git remote add upstream git@github.com:thepensionsregulator/react-components.git git fetch upstream git branch --set-upstream-to=upstream/master master
This will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local
master
branch to use the upstream master branch whenever you rungit pull
. Then you can make all of your pull request branches based on thismaster
branch. Whenever you want to update your version ofmaster
, do a regulargit pull
.
Please make sure to run the tests before you commit your changes. You can run
yarn test
which will update any snapshots that need updating.
Automatic deployment:
- Branch names will be automatically published to NPM with a
next
tag on apatch
version, only if they pass build and tests on Azure Pipelines. The status of deployment will be visible on a pull request.
Manual deployment:
-
When you're ready to deploy
minor
ormajor
versions you can do so from updateddevelop
branch in your terminal running commandyarn deploy --message "Release AB#12345"
and follow the instructions in your terminal. UpdateAB#12345
to refer to the Azure Boards work item relevant to your work.Lerna
will bump all versions to chosen ones and will push git refs to Github and new packages to the NPM registry. -
If Azure Pipelines doesn't automatically publish, you can also run
yarn deploy --message "Release AB#12345" --dist-tag next
locally to add thenext
tag. -
Sometimes, you need github to publish to npm on your behalf. To do this, try
npx lerna publish from-git
Automatic deployment:
- Create a PR to master branch and Netlify will build Gatsby's site. If a build is successful, merge it and the production site will be updated.