From 47a419a0d6e453c47e30fcda21dfca521aafe792 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 5 Nov 2026 07:03:57 +0000 Subject: [PATCH 1/3] fix: let the frontend-types publish authenticate with npm via OIDC The publish_types job fell back to NPM_TOKEN because neither the caller job nor the reusable workflow granted id-token: write, and every token publish since 2026-10-27 has failed with E404 on PUT. Also exclude test mocks, fixtures, stories and storybook mocks from the declaration build; the published index.d.ts is byte-identical. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-draft-create.yaml | 3 +++ .github/workflows/release-npm-types.yaml | 1 + tsconfig.types.json | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-draft-create.yaml b/.github/workflows/release-draft-create.yaml index 526548ec494..1e06ef72dd9 100644 --- a/.github/workflows/release-draft-create.yaml +++ b/.github/workflows/release-draft-create.yaml @@ -100,6 +100,9 @@ jobs: publish_types: needs: build + permissions: + contents: read + id-token: write uses: ./.github/workflows/release-npm-types.yaml with: version: ${{ needs.build.outputs.version }} diff --git a/.github/workflows/release-npm-types.yaml b/.github/workflows/release-npm-types.yaml index db896fcea1e..04d1573372a 100644 --- a/.github/workflows/release-npm-types.yaml +++ b/.github/workflows/release-npm-types.yaml @@ -40,6 +40,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read + id-token: write steps: - name: Validate inputs shell: bash diff --git a/tsconfig.types.json b/tsconfig.types.json index 914224ad83c..dcddbc1a858 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -47,6 +47,10 @@ "dist", "**/*.vue", "**/*.spec.ts", - "**/*.test.ts" + "**/*.test.ts", + "**/*.stories.ts", + "**/__mocks__/**", + "**/__fixtures__/**", + "src/storybook/**" ] } From 3fc0a81e91a6039e64cfb79cf4a390b599693662 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 5 Nov 2026 07:36:02 +0000 Subject: [PATCH 2/3] fix: keep dependency lifecycle scripts away from the types publish OIDC token id-token: write is job-scoped, so install without lifecycle scripts and without persisted checkout credentials, matching publish-package.yaml. Build the workspace packages explicitly, since the skipped prepare script used to do it and the declaration bundle and consumer check depend on it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-npm-types.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-npm-types.yaml b/.github/workflows/release-npm-types.yaml index 04d1573372a..9fd3e31f24c 100644 --- a/.github/workflows/release-npm-types.yaml +++ b/.github/workflows/release-npm-types.yaml @@ -75,6 +75,7 @@ jobs: with: ref: ${{ steps.resolve_ref.outputs.ref }} fetch-depth: 1 + persist-credentials: false - name: Install pnpm uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 @@ -87,10 +88,13 @@ jobs: registry-url: https://registry.npmjs.org - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --ignore-scripts env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' + - name: Build workspace packages + run: pnpm build:packages + - name: Build types run: pnpm build:types @@ -153,7 +157,7 @@ jobs: - name: Publish package if: steps.check_npm.outputs.exists == 'false' - run: pnpm publish --access public --tag "$DIST_TAG" --no-git-checks + run: pnpm publish --access public --tag "$DIST_TAG" --no-git-checks --ignore-scripts working-directory: dist env: DIST_TAG: ${{ steps.dist_tag.outputs.tag }} From dc9ac0901ab6ab12e9378d887005a3149657072d Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 5 Nov 2026 07:56:26 +0000 Subject: [PATCH 3/3] fix: default the release draft workflow to read-only token permissions Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-draft-create.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-draft-create.yaml b/.github/workflows/release-draft-create.yaml index 1e06ef72dd9..f24487521fa 100644 --- a/.github/workflows/release-draft-create.yaml +++ b/.github/workflows/release-draft-create.yaml @@ -8,6 +8,9 @@ on: paths: - 'package.json' +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest