Skip to content

Commit 7ffe40b

Browse files
ci: introduce changesets (#276)
* ci: introduce changesets * Remove old publish script
1 parent dc689ca commit 7ffe40b

File tree

11 files changed

+769
-255
lines changed

11 files changed

+769
-255
lines changed

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{ "repo": "TanStack/create-tsrouter-app" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"baseBranch": "main",
10+
"updateInternalDependencies": "patch",
11+
"fixed": [],
12+
"linked": [],
13+
"ignore": [],
14+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
15+
"onlyUpdatePeerDependentsWhenOutOfRange": true
16+
}
17+
}

.github/workflows/pr.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
8+
cancel-in-progress: true
9+
10+
env:
11+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test:
18+
name: Test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6.0.1
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Tools
26+
uses: tanstack/config/.github/setup@main
27+
- name: Build
28+
run: pnpm build
29+
- name: Test
30+
run: pnpm test
31+
preview:
32+
provenance:
33+
name: Provenance
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v6.0.1
38+
with:
39+
fetch-depth: 0
40+
- name: Check Provenance
41+
uses: danielroe/provenance-action@v0.1.1
42+
with:
43+
fail-on-downgrade: true

.github/workflows/release.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
tag:
7-
description: override release tag
8-
required: false
94
push:
10-
branches: [main, alpha, beta]
5+
branches: [main, alpha, beta, rc]
116

127
concurrency:
138
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
149
cancel-in-progress: true
1510

11+
env:
12+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13+
1614
permissions:
1715
contents: write
1816
id-token: write
@@ -34,11 +32,17 @@ jobs:
3432
run: pnpm build
3533
- name: Test
3634
run: pnpm test
37-
- name: Publish
38-
run: |
39-
git config --global user.name 'Tanner Linsley'
40-
git config --global user.email 'tannerlinsley@users.noreply.github.com'
41-
pnpm run cipublish
35+
- name: Run Changesets (version or publish)
36+
uses: changesets/action@v1.5.3
37+
with:
38+
version: pnpm run changeset:version
39+
publish: pnpm run changeset:publish
40+
commit: "ci: Version Packages"
41+
title: "ci: Version Packages"
4242
env:
43-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
TAG: ${{ inputs.tag }}
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Comment on PRs about release
45+
if: steps.changesets.outputs.published == 'true'
46+
uses: tanstack/config/.github/comment-on-release@main
47+
with:
48+
published-packages: ${{ steps.changesets.outputs.publishedPackages }}

examples/custom-cli/create-qwik-app/customized-ui/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "customized-ui",
33
"private": true,
4-
"version": "0.0.0",
54
"type": "module",
65
"scripts": {
76
"dev:ui": "VITE_API_BASE_URL=http://localhost:8080 vite",

examples/custom-cli/create-qwik-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-qwik-app",
3-
"version": "0.15.2",
3+
"private": true,
44
"description": "CTA Qwik Builder",
55
"bin": "./dist/index.js",
66
"type": "module",

examples/custom-cli/create-rwsdk/customized-ui/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "rwsdk-customized-ui",
33
"private": true,
4-
"version": "0.0.0",
54
"type": "module",
65
"scripts": {
76
"dev:ui": "VITE_API_BASE_URL=http://localhost:8080 vite",

examples/custom-cli/create-rwsdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-rwsdk-app",
3-
"version": "0.15.2",
3+
"private": true,
44
"description": "CTA RedwoodSDK Builder",
55
"bin": "./dist/index.js",
66
"type": "module",

examples/custom-cli/customized-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "customized-react-app",
3-
"version": "0.15.2",
3+
"private": true,
44
"description": "CTA Qwik Builder",
55
"bin": "./dist/index.js",
66
"type": "module",

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@
1010
"scripts": {
1111
"cleanNodeModules": "rm -rf node_modules && pnpm -r exec rm -rf node_modules",
1212
"build": "nx run-many --target=build --parallel 5",
13-
"cipublish": "node scripts/publish.js",
1413
"dev": "nx run-many --target=dev --parallel 20",
15-
"test": "nx run-many -t test",
14+
"test": "nx run-many --target=test",
1615
"check-outdated": "node scripts/check-outdated-packages.js",
1716
"update-outdated": "node scripts/check-outdated-packages.js --update",
18-
"prepare": "husky install"
17+
"prepare": "husky install",
18+
"changeset": "changeset",
19+
"changeset:publish": "changeset publish",
20+
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile"
1921
},
2022
"devDependencies": {
23+
"@changesets/cli": "^2.29.8",
24+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
2125
"@tanstack/eslint-config": "^0.3.4",
22-
"@tanstack/publish-config": "^0.2.2",
2326
"eslint": "^9.20.0",
2427
"eslint-plugin-react-hooks": "^5.1.0",
2528
"eslint-plugin-unused-imports": "^4.1.4",

0 commit comments

Comments
 (0)