Skip to content

Commit 1e963e8

Browse files
chore: introduce changesets (#218)
* WIP: Try changesets * Update ci.yml * Give permission to write PRs
1 parent 6e41c22 commit 1e963e8

File tree

7 files changed

+599
-10
lines changed

7 files changed

+599
-10
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/clean-rats-fall.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/config': patch
3+
---
4+
5+
demo changesets

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "TanStack/config" }],
4+
"commit": false,
5+
"access": "public",
6+
"baseBranch": "main",
7+
"updateInternalDependencies": "patch",
8+
"fixed": [],
9+
"linked": [],
10+
"ignore": []
11+
}

.github/workflows/ci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
permissions:
2020
contents: write
2121
id-token: write
22+
pull-requests: write
2223

2324
jobs:
2425
test-and-publish:
@@ -34,13 +35,13 @@ jobs:
3435
uses: ./.github/setup
3536
- name: Run Tests
3637
run: pnpm run test:ci
37-
- name: Publish
38-
run: |
39-
git config --global user.name 'Tanner Linsley'
40-
git config --global user.email '[email protected]'
41-
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
42-
pnpm run cipublish
38+
- name: Run Changesets (version or publish)
39+
uses: changesets/[email protected]
40+
with:
41+
version: pnpm run changeset:version
42+
publish: pnpm run changeset:publish
43+
commit: 'ci: Version Packages'
44+
title: 'ci: Version Packages'
4345
env:
44-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
TAG: ${{ inputs.tag }}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
"test:format": "pnpm run prettier --check",
2020
"prettier": "prettier --ignore-unknown .",
2121
"prettier:write": "pnpm run prettier --write",
22-
"cipublish": "node ./packages/config/bin/config.js publish --cwd .",
23-
"cipublishforce": "CI=true pnpm cipublish"
22+
"changeset": "changeset",
23+
"changeset:version": "changeset version && pnpm install && pnpm prettier:write",
24+
"changeset:publish": "changeset publish"
2425
},
2526
"devDependencies": {
27+
"@changesets/changelog-github": "catalog:",
28+
"@changesets/cli": "catalog:",
2629
"@types/node": "catalog:",
2730
"jsdom": "catalog:",
2831
"nx": "catalog:",

0 commit comments

Comments
 (0)