Skip to content

Commit 1540eec

Browse files
committed
cleanup and hardening
1 parent c15a85c commit 1540eec

24 files changed

+42
-17054
lines changed

.github/workflows/changesets-dependencies.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
nodeVersion:
2323
required: false
2424
type: string
25-
default: '18'
25+
default: '22'
2626
secrets:
2727
githubToken:
2828
required: true
@@ -33,7 +33,7 @@ jobs:
3333
if: github.event.pull_request.head.repo.full_name == github.repository
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v4.2.2
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.githubToken }}

.github/workflows/ci-node-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
nodeVersions:
1111
required: true
1212
type: string
13-
default: '[18]'
13+
default: '[22]'
1414
packageManager:
1515
type: string
1616
required: false
@@ -42,7 +42,7 @@ jobs:
4242
name: nodejs v${{ matrix.nodeVersion }}
4343
steps:
4444
- name: checkout
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v4.2.2
4646

4747
- uses: the-guild-org/shared-config/setup@main
4848
name: setup env

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
nodeVersion:
88
required: false
99
type: string
10-
default: '21'
10+
default: '22'
1111
script:
1212
required: true
1313
type: string
@@ -29,7 +29,7 @@ jobs:
2929
name: ${{ inputs.name || 'script' }}
3030
steps:
3131
- name: checkout
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v4.2.2
3333

3434
- uses: the-guild-org/shared-config/setup@main
3535
name: setup env

.github/workflows/lint.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
nodeVersion:
88
required: false
99
type: string
10-
default: '18'
10+
default: '22'
1111
packageManager:
1212
type: string
1313
required: false
@@ -17,21 +17,9 @@ on:
1717
description: Package manager version
1818
required: false
1919
default: ''
20-
annotations:
21-
required: false
22-
type: boolean
23-
default: true
24-
onlyPrFiles:
25-
required: false
26-
type: boolean
27-
default: true
2820
script:
2921
required: false
3022
type: string
31-
reportFile:
32-
required: false
33-
type: string
34-
default: eslint_report.json
3523
secrets:
3624
githubToken:
3725
required: false
@@ -41,7 +29,7 @@ jobs:
4129
runs-on: ubuntu-24.04
4230
steps:
4331
- name: checkout
44-
uses: actions/checkout@v4
32+
uses: actions/checkout@v4.2.2
4533

4634
- uses: the-guild-org/shared-config/setup@main
4735
name: setup env
@@ -53,15 +41,3 @@ jobs:
5341
- name: lint
5442
run: ${{ inputs.script || 'yarn eslint --output-file eslint_report.json --format json .' }}
5543
continue-on-error: ${{ github.event_name == 'pull_request' }}
56-
57-
- name: annotate
58-
if:
59-
${{ github.event_name == 'pull_request' && inputs.annotations &&
60-
github.event.pull_request.head.repo.full_name == github.repository }}
61-
continue-on-error: true
62-
uses: ataylorme/eslint-annotate-action@v2
63-
with:
64-
repo-token: ${{ secrets.githubToken }}
65-
report-json: ${{ inputs.script && inputs.reportFile || 'eslint_report.json' }}
66-
only-pr-files: ${{ inputs.onlyPrFiles }}
67-
check-name: eslint

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
npmTag: alpha
2020
buildScript: build
21-
nodeVersion: 18
21+
nodeVersion: 22
2222
packageManager: pnpm
2323
secrets:
2424
githubToken: ${{ secrets.GITHUB_TOKEN }}
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
npmTag: rc
3232
buildScript: build
33-
nodeVersion: 18
33+
nodeVersion: 22
3434
packageManager: pnpm
3535
restoreDeletedChangesets: true
3636
secrets:

.github/workflows/release-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
nodeVersion:
1717
required: false
1818
type: string
19-
default: '18'
19+
default: '22'
2020
buildScript:
2121
required: false
2222
type: string
@@ -57,7 +57,7 @@ jobs:
5757
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
5858
steps:
5959
- name: checkout
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v4.2.2
6161
with:
6262
fetch-depth: 0
6363
ref: ${{ github.event.pull_request.head.sha }}

.github/workflows/release-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
nodeVersion:
1717
required: false
1818
type: string
19-
default: '18'
19+
default: '22'
2020
releaseScript:
2121
required: false
2222
type: string
@@ -59,7 +59,7 @@ jobs:
5959
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
6060
steps:
6161
- name: checkout
62-
uses: actions/checkout@v4
62+
uses: actions/checkout@v4.2.2
6363
with:
6464
fetch-depth: 0
6565
token: ${{ secrets.githubToken }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: ./.github/workflows/release-stable.yml
1212
with:
1313
releaseScript: release
14-
nodeVersion: 18
14+
nodeVersion: 22
1515
packageManager: pnpm
1616
secrets:
1717
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}

.github/workflows/validate-mdx-links.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
cancel-in-progress: true
4242

4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v4.2.2
4545
name: checkout
4646

4747
- uses: the-guild-org/shared-config/setup@main

README.md

Lines changed: 11 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ configurations/pipelines needed.
88

99
<details>
1010
<summary>Step 1: changesets</summary>
11-
11+
1212
To setup automated release flow for your package, using `changesets`:
1313

1414
1. Create a monorepo, either by using `yarn` (v1) or `pnpm`.
@@ -106,7 +106,7 @@ jobs:
106106
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
107107
with:
108108
releaseScript: release # script to run as part of publish command
109-
nodeVersion: 18 # you can change if needed
109+
nodeVersion: 22 # you can change if needed
110110
secrets:
111111
githubToken: ${{ secrets.GITHUB_TOKEN }}
112112
npmToken: ${{ secrets.NPM_TOKEN }}
@@ -152,7 +152,7 @@ jobs:
152152
with:
153153
npmTag: alpha
154154
buildScript: build
155-
nodeVersion: 18
155+
nodeVersion: 22
156156
secrets:
157157
githubToken: ${{ secrets.GITHUB_TOKEN }}
158158
npmToken: ${{ secrets.NPM_TOKEN }}
@@ -165,9 +165,9 @@ jobs:
165165

166166
<details>
167167
<summary>Step 6: Renovate</summary>
168-
168+
169169
1. Install Renovate Bot on your repo: https://github.com/marketplace/renovate
170-
2. Wait for Renovate to create the first setup PR and merge it.
170+
2. Wait for Renovate to create the first setup PR and merge it.
171171
3. Create `renovate.json` config file in the repo, with the following:
172172

173173
```
@@ -204,7 +204,7 @@ jobs:
204204

205205
<details>
206206
<summary>Step 9: ESLint/Prettier config</summary>
207-
207+
208208
If you wish to use the unified config for eslint or prettier, following these instructions:
209209

210210
- eslint: https://github.com/the-guild-org/shared-config/tree/main/packages/eslint-config
@@ -283,7 +283,7 @@ jobs:
283283
uses: the-guild-org/shared-config/.github/workflows/ci-node-matrix.yml@main
284284
with:
285285
script: yarn build
286-
nodeVersions: '[14,16,18]'
286+
nodeVersions: '[22,23]'
287287
```
288288

289289
If your script requires more stuff, and you just want to avoid configuring NodeJS + Yarn + Caches,
@@ -309,7 +309,7 @@ jobs:
309309
- uses: the-guild-org/shared-config/setup@main
310310
name: setup env
311311
with:
312-
nodeVersion: 18
312+
nodeVersion: 22
313313
```
314314

315315
</details>
@@ -328,7 +328,7 @@ jobs:
328328
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
329329
with:
330330
releaseScript: release
331-
nodeVersion: 18
331+
nodeVersion: 22
332332
secrets:
333333
githubToken: ${{ secrets.GUILD_BOT_TOKEN }} # HERE
334334
npmToken: ${{ secrets.NPM_TOKEN }}
@@ -345,7 +345,7 @@ jobs:
345345
with:
346346
npmTag: alpha
347347
buildScript: build
348-
nodeVersion: 18
348+
nodeVersion: 22
349349
secrets:
350350
githubToken: ${{ secrets.GITHUB_TOKEN }}
351351
npmToken: ${{ secrets.NPM_TOKEN }}
@@ -357,127 +357,10 @@ jobs:
357357
npmTag: rc # Here we are using a different tag
358358
restoreDeletedChangesets: true # Make sure to add this flag, in order to make changesets visible to the release pipeline!
359359
buildScript: build
360-
nodeVersion: 18
360+
nodeVersion: 22
361361
secrets:
362362
githubToken: ${{ secrets.GITHUB_TOKEN }}
363363
npmToken: ${{ secrets.NPM_TOKEN }}
364364
```
365365

366366
</details>
367-
368-
<details>
369-
<summary> Step 13: Trackback</summary>
370-
371-
Trackback is a in-house tool for The Guild repositories, that allows up to easily test `rc`
372-
releases.
373-
374-
To use that, following these instructions:
375-
376-
1. Ensure you have `GUILD_BOT_TOKEN` set.
377-
2. Find the workflows in your repositories that might be effected by changes. Usually `build` /
378-
`typecheck` and `test` are relevant here. Also more complicated workflows, such as integration
379-
tests. Add this at the end of the workflow (or, after the importand command):
380-
381-
```yaml
382-
- uses: the-guild-org/shared-config/release-trackback@main
383-
if: ${{ always() }}} # Important!
384-
with:
385-
token: ${{ secrets.GUILD_BOT_TOKEN }} # Make sure to use the Guild bot token here
386-
relevantPackages:
387-
| # Here you can specify a list of explicit dependencies, or using "*" matcher.
388-
@theguild/*
389-
@whatwg-node/*
390-
```
391-
392-
3. To make sure your repository accepts Renovate configuration for alpha release, use the following
393-
snippet in your `renovate.json` config file:
394-
395-
```json
396-
{
397-
"groupName": "whatwg-node",
398-
"matchPackageNames": ["@whatwg-node/*"],
399-
"prPriority": 21,
400-
"ignoreUnstable": false,
401-
"respectLatest": false,
402-
"allowedVersions": "/^([0-9]+).([0-9]+)(?:.([0-9]+))?(-rc-.+)?$/"
403-
}
404-
```
405-
406-
4. Now, if a **Renovate PR** with **`rc`** release, for a depenendecies declared under
407-
`relevantPackages` will fail your workflow, you'll get a comment on `Upcoming Release Changes` PR
408-
in the source repository!
409-
410-
</details>
411-
412-
<details>
413-
<summary>Step 13: (Optional) Setup Algolia search</summary>
414-
415-
We recommend setup Algolia to any The Guild project that provides documentation with Nextra.
416-
417-
<br />
418-
419-
1. Install `@theguild/algolia`
420-
421-
```
422-
yarn add -D @theguild/algolia
423-
```
424-
425-
2. Configure Prettier
426-
427-
If Prettier or other tools are used, ensure to exclude the `website/algolia-lockfile.json` file.
428-
429-
3. Add Algolia credentials to repo secrets
430-
431-
Configure the following GitHub Actions secrets from your Algolia dashboard:
432-
433-
- `ALGOLIA_ADMIN_API_KEY`
434-
435-
4. Add the GitHub Actions workflows
436-
437-
_PR workflow example_
438-
439-
```yml
440-
name: pr
441-
on:
442-
pull_request:
443-
branches:
444-
- master
445-
446-
jobs:
447-
algolia:
448-
uses: the-guild-org/shared-config/.github/workflows/algolia-integrity.yml@main
449-
with:
450-
domain: https://www.the-guild.dev/graphql/codegen/
451-
secrets:
452-
githubToken: ${{ secrets.GITHUB_TOKEN }}
453-
```
454-
455-
_main branch workflow example_
456-
457-
```yml
458-
name: release
459-
on:
460-
push:
461-
branches:
462-
- master
463-
464-
jobs:
465-
algolia:
466-
uses: the-guild-org/shared-config/.github/workflows/algolia-publish.yml@main
467-
secrets:
468-
githubToken: ${{ secrets.GITHUB_TOKEN }}
469-
algoliaAdminApiKey: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
470-
with:
471-
domain: https://www.the-guild.dev/graphql/codegen/
472-
```
473-
474-
</details>
475-
476-
For the complete list of available options (`with: ...`), please refer to the
477-
[workflow declaration](./github/workflows/algolia-integrity.yml).
478-
479-
If your project runs a node version different version of `18` or uses a package manager different
480-
from `yarn`, please use the following options under the `with` block:
481-
482-
- `packageManager: "pnpm"`
483-
- `nodeVersion: 16`

0 commit comments

Comments
 (0)