44 branches :
55 - v2
66
7+ # Ensure scripts are run with pipefail. See:
8+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
9+ defaults :
10+ run :
11+ shell : bash
12+
713jobs :
814 tests :
9- runs-on : ubuntu-latest
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ os :
19+ - ubuntu-latest
20+ - windows-latest
21+ - macos-latest
22+
23+ runs-on : ${{ matrix.os }}
24+
1025 steps :
11- # Check out, and set up the node/ruby infra
1226 - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1327 - uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1428 with :
1529 node-version : " 18.x"
30+ - uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
1631
17- # Install, should be basically instant if cached
18- - run : yarn install
19- env :
20- YARN_CHECKSUM_BEHAVIOR : ignore
21-
22- # Verify dependencies are hooked up right
23- - run : node test/verifyPackageVersions.js
32+ - run : pnpm install
2433
2534 # Grab localizations
26- - run : yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
35+ - run : pnpm docs-sync pull microsoft/TypeScript-Website-localizations#main 1
2736
2837 # Build the packages
29- - run : yarn bootstrap
30- - run : yarn build
38+ - run : pnpm bootstrap
39+ - run : pnpm build
3140
3241 # Verify it compiles
33- - run : yarn build-site
42+ - run : pnpm build-site
3443
3544 - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
36- if : github.event_name == 'pull_request'
45+ if : github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
3746 with :
3847 name : site
3948 path : packages/typescriptlang-org/public
4049
4150 # Run all the package's tests
42- - run : yarn test
43- env :
44- CI : true
51+ - run : pnpm test
4552
4653 # danger for PR builds
47- - if : github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
48- run : " yarn danger ci"
54+ - if : github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id && matrix.os == 'ubuntu-latest'
55+ run : " pnpm danger ci"
4956 env :
5057 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5158
@@ -69,30 +76,41 @@ jobs:
6976 name : missing.patch
7077 path : missing.patch
7178
72- windows :
73- runs-on : windows-latest
74-
79+ changesets :
80+ name : changesets
81+ runs-on : ubuntu-latest
7582 steps :
76- # Check out, and set up the node infra
77- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
78- - uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
79- with :
80- node-version : " 18.x"
83+ - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
84+ with :
85+ fetch-depth : 0
86+ - uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
87+ with :
88+ node-version : ' lts/*'
89+ - uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
90+
91+ - run : pnpm install
92+
93+ - name : Check for missing changesets
94+ run : |
95+ PR_CHANGESETS=$(ls .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l)
96+ MAIN_CHANGESETS=$(git ls-tree -r origin/v2 .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l)
8197
82- # Get local dependencies
83- - run : yarn install
84- env :
85- YARN_CHECKSUM_BEHAVIOR : ignore
98+ # If the PR has no changesets, but main has changesets, assume this is PR is a versioning PR and exit
99+ if [[ $PR_CHANGESETS -eq 0 && $MAIN_CHANGESETS -gt 0 ]]; then
100+ echo "This PR is a versioning PR, exiting"
101+ exit 0
102+ fi
86103
87- - run : yarn bootstrap
88- - run : yarn build
104+ # git switch -c changesets-temp
105+ # git checkout origin/v2 -- <ignored files>
106+ pnpm changeset status --since=origin/v2
89107
90108 required :
91109 runs-on : ubuntu-latest
92110 if : ${{ always() }}
93111 needs :
94112 - tests
95- - windows
113+ - changesets
96114
97115 steps :
98116 - name : Check required jobs
0 commit comments