Skip to content

Commit 0ca0374

Browse files
authored
chore: prune Stainless-era CI cruft and vestigial release-doctor (#1364)
The Stainless templates left behind a bunch of CI scaffolding that's no longer doing anything in this repo: ci.yml - `on.push.branches` filter listed Stainless-internal codegen branches (`integrated/**`, `stl-preview-*`, `codegen/**`, `codegen/stl/**`) that never land here. Replaced with `branches: [main]` so push runs fire only on merge. - `on.pull_request.branches-ignore` filtered the same Stainless preview branches. Dropped — same reasoning. - Job-level `if:` guards (`github.event_name == 'push' || github.event.pull_request.head.repo.fork` etc.) existed to deduplicate the duplicate runs you get when both push + pull_request fire for a same-repo PR. Under the new `on:` shape (push only on main, pull_request unfiltered) each commit triggers exactly one run, so the dedup is unnecessary. - `runs-on` toggled to `depot-ubuntu-24.04` when running under `stainless-sdks/increase-typescript`. We never run there. Simplified to `ubuntu-latest`. - `'codegen metadata'` head-commit guard skipped CI for Stainless's codegen housekeeping commits. We don't push those. - The build job's OIDC token + `upload-artifact.sh` step pushed build tarballs to `pkg.stainless.com/s` for Stainless's preview UI. Dead endpoint for us. Dropped along with the `id-token: write` permission it required. release-doctor.yml + bin/check-release-environment - The script was a literal no-op (`errors=()` array, never populated, always prints "ready"). It exists in templates as a pre-flight check for repos with publish secrets (PYPI_TOKEN etc.); this repo uses OIDC trusted publishing on npm so there's no token to check. - Even with checks populated, the only failure mode it catches that the publish workflow doesn't is "secret literally not set" — which recovers in 30s by setting the secret and re-running publish. Without branch-protection enforcement (which we don't have), it's a soft warning, not a gate. Drop it entirely.
1 parent 4786c2e commit 0ca0374

3 files changed

Lines changed: 4 additions & 75 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- '**'
6-
- '!integrated/**'
7-
- '!stl-preview-head/**'
8-
- '!stl-preview-base/**'
9-
- '!generated'
10-
- '!codegen/**'
11-
- 'codegen/stl/**'
4+
branches: [main]
125
pull_request:
13-
branches-ignore:
14-
- 'stl-preview-head/**'
15-
- 'stl-preview-base/**'
166

177
jobs:
188
lint:
199
timeout-minutes: 10
2010
name: lint
21-
runs-on: ${{ github.repository == 'stainless-sdks/increase-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
22-
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
11+
runs-on: ubuntu-latest
2312
steps:
2413
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2514

@@ -37,11 +26,7 @@ jobs:
3726
build:
3827
timeout-minutes: 5
3928
name: build
40-
runs-on: ${{ github.repository == 'stainless-sdks/increase-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
41-
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
42-
permissions:
43-
contents: read
44-
id-token: write
29+
runs-on: ubuntu-latest
4530
steps:
4631
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4732

@@ -56,29 +41,10 @@ jobs:
5641
- name: Check build
5742
run: ./scripts/build
5843

59-
- name: Get GitHub OIDC Token
60-
if: |-
61-
github.repository == 'stainless-sdks/increase-typescript' &&
62-
!startsWith(github.ref, 'refs/heads/stl/')
63-
id: github-oidc
64-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
65-
with:
66-
script: core.setOutput('github_token', await core.getIDToken());
67-
68-
- name: Upload tarball
69-
if: |-
70-
github.repository == 'stainless-sdks/increase-typescript' &&
71-
!startsWith(github.ref, 'refs/heads/stl/')
72-
env:
73-
URL: https://pkg.stainless.com/s
74-
AUTH: ${{ steps.github-oidc.outputs.github_token }}
75-
SHA: ${{ github.sha }}
76-
run: ./scripts/utils/upload-artifact.sh
7744
test:
7845
timeout-minutes: 10
7946
name: test
80-
runs-on: ${{ github.repository == 'stainless-sdks/increase-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
81-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
47+
runs-on: ubuntu-latest
8248
steps:
8349
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8450

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

bin/check-release-environment

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)