diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..0e32a8b571 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", + "changelog": [ + "@svitejs/changesets-changelog-github-compact", + { "repo": "TanStack/query" } + ], + "commit": false, + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "fixed": [], + "linked": [] +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..285efb166a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +## ๐ŸŽฏ Changes + + + +## โœ… Checklist + +- [ ] I have followed the steps listed in the [Contributing guide](https://github.com/TanStack/config/blob/main/CONTRIBUTING.md). +- [ ] I have tested and linted this code locally. +- [ ] I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) for this PR, or this PR should not release a new version. diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ec188c41bf..2e99243692 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: pr +name: PR on: pull_request: @@ -30,7 +30,7 @@ jobs: - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Get base and head commits for `nx affected` - uses: nrwl/nx-set-shas@v4.1.2 + uses: nrwl/nx-set-shas@v4.3.0 with: main-branch-name: main - name: Run Checks diff --git a/.github/workflows/ci.yml b/.github/workflows/release.yml similarity index 67% rename from .github/workflows/ci.yml rename to .github/workflows/release.yml index 466fa20d62..4a35b203b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,6 @@ -name: ci +name: Release on: - workflow_dispatch: - inputs: - tag: - description: override release tag - required: false push: branches: [main, alpha, beta, rc, v4] @@ -19,10 +14,11 @@ env: permissions: contents: write id-token: write + pull-requests: write jobs: - test-and-publish: - name: Test & Publish + release: + name: Release if: github.repository_owner == 'TanStack' runs-on: ubuntu-latest steps: @@ -39,16 +35,16 @@ jobs: - name: Stop Nx Agents if: ${{ always() }} run: npx nx-cloud stop-all-agents - - name: Publish - run: | - git config --global user.name 'Tanner Linsley' - git config --global user.email 'tannerlinsley@users.noreply.github.com' - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - pnpm run cipublish + - name: Run Changesets (version or publish) + uses: changesets/action@v1.5.3 + with: + version: pnpm run changeset:version + publish: pnpm run changeset:publish + commit: 'ci: Version Packages' + title: 'ci: Version Packages' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - TAG: ${{ inputs.tag }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v4.6.0 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb7ff182cc..2d90db264c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -155,79 +155,9 @@ You can use Gitpod (An Online Open Source VS Code like IDE which is free for Ope [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/query) -## Commit message conventions +## Changesets -`TanStack/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**: - -```text -(): - - - -