From 2d1265b82f3e7287115110435b8ddb81798e1d3f Mon Sep 17 00:00:00 2001 From: Rohit Garg Date: Sat, 25 Apr 2020 15:50:37 +0530 Subject: [PATCH 01/12] chore: Using semantic release for publishing and changelog generation --- .github/workflows/test.yml | 21 ++++++- CONTRIBUTING.md | 114 +++++++++++++++++++++++++++++++++++++ README.md | 4 +- 3 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3b6e0dd07..119204f502 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,28 @@ jobs: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - - uses: actions/checkout@v2-beta + - uses: actions/checkout@v2 with: fetch-depth: 1 - run: npm i -g yarn - run: yarn --frozen-lockfile - run: yarn test:ci + + publish-module: + name: 'Publish Module to NPM' + needs: test + if: github.ref == 'refs/heads/master' #publish only when merged in master, not on PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npx semantic-release@17 + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + GH_TOKEN: ${{secrets.GH_TOKEN}} + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..fc194bcd78 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,114 @@ +# Contributing + +## Questions + +If you have questions about implementation details, help or support, then please use our dedicated community forum at [Github Discussions](https://github.com/tannerlinsley/react-query/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum. + +## Reporting Issues + +If you have found what you think is a bug, please [file an issue](https://github.com/tannerlinsley/react-query/issues/new). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [Github Discussions](https://github.com/tannerlinsley/react-query/discussions) + +## Suggesting new features + +If you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented. + +## Development + +If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started: + +- Fork this repository +- Install dependencies by running `$ yarn` +- Link `react-query` locally by running `$ yarn link` +- Auto-build files as you edit by running `$ yarn start` +- Implement your changes and tests to files in the `src/` directory and corresponding test files +- To run examples, follow their individual directions. Usually this is just `$ yarn && yarn start`. +- To run examples using your local build, link to the local `react-query` by running `$ yarn link react-query` from the example's directory +- Document your changes in the appropriate doc page +- Git stage your required chnages and commit (see below commit guidelines) +- Submit PR for review + +## Commit message conventions + +`react-query` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). + +We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. + +### Commit Message Format + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +