Skip to content

Commit cbe3a29

Browse files
ci: set up Changesets releases (#20)
1 parent 4a51600 commit cbe3a29

10 files changed

Lines changed: 952 additions & 8 deletions

File tree

‎.changeset/README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Releases
2+
3+
Run `pnpm changeset` for changes to `@tanstack/redact`, then commit the generated file with your pull request.
4+
5+
After merge, the Release workflow opens or updates `ci: Version Packages`. Merge that pull request to publish to npm with the `latest` tag and create a GitHub release. The workflow runs tests, type checks, the build, and size checks before versioning or publishing.
6+
7+
Publishing uses npm trusted publishing for `TanStack/redact`, workflow `release.yml`, with no GitHub environment.

‎.changeset/config.json‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{
6+
"repo": "TanStack/redact"
7+
}
8+
],
9+
"commit": false,
10+
"access": "public",
11+
"baseBranch": "main",
12+
"updateInternalDependencies": "patch",
13+
"fixed": [],
14+
"linked": [],
15+
"ignore": [],
16+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
17+
"onlyUpdatePeerDependentsWhenOutOfRange": true
18+
},
19+
"privatePackages": {
20+
"version": false,
21+
"tag": false
22+
}
23+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tanstack/redact": patch
3+
---
4+
5+
Preserve muted audio and video during hydration, and handle enumerated attribute values consistently across server rendering, hydration, and DOM updates.

‎.github/workflows/pr.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
name: Test
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
fetch-depth: 0
23+
persist-credentials: false
24+
- name: Setup Tools
25+
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3
26+
- name: Run Checks
27+
run: pnpm run test:pr

‎.github/workflows/release.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9+
cancel-in-progress: false
10+
11+
permissions:
12+
contents: write
13+
id-token: write
14+
pull-requests: write
15+
16+
jobs:
17+
release:
18+
name: Release
19+
if: github.repository_owner == 'TanStack'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
27+
- name: Setup Tools
28+
uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3
29+
- name: Run Tests
30+
run: pnpm run test:ci
31+
- name: Run Changesets (version or publish)
32+
id: changesets
33+
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
34+
with:
35+
version: pnpm run changeset:version
36+
publish: pnpm run changeset:publish
37+
commit: 'ci: Version Packages'
38+
title: 'ci: Version Packages'
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.nvmrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.14.1

‎package.json‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@
1414
"example:playground": "pnpm --filter dom-jsx-playground dev",
1515
"example:ssr": "pnpm --filter ssr-demo dev",
1616
"example:hydration-lab": "pnpm --filter ssr-demo dev",
17-
"bench": "node scripts/run-bench.mjs"
17+
"bench": "node scripts/run-bench.mjs",
18+
"changeset": "changeset",
19+
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile",
20+
"changeset:publish": "changeset publish",
21+
"test:ci": "pnpm test && pnpm test:types && pnpm build && pnpm size:check",
22+
"test:pr": "pnpm test:ci"
1823
},
1924
"devDependencies": {
2025
"esbuild": "^0.28.0",
2126
"playwright": "^1.59.1",
2227
"typescript": "~5.9.3",
2328
"vite": "^5.4.11",
24-
"vitest": "^2.1.8"
29+
"vitest": "^2.1.8",
30+
"@changesets/cli": "^2.31.0",
31+
"@svitejs/changesets-changelog-github-compact": "^1.2.0"
2532
},
2633
"packageManager": "pnpm@9.15.0"
2734
}

‎packages/redact/package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,10 @@
8383
},
8484
"publishConfig": {
8585
"access": "public"
86+
},
87+
"repository": {
88+
"type": "git",
89+
"url": "git+https://github.com/TanStack/redact.git",
90+
"directory": "packages/redact"
8691
}
8792
}

0 commit comments

Comments
 (0)