From 66b59c409db6e7457d3b8552601711e1f7ced520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 15 Nov 2025 23:52:24 +0100 Subject: [PATCH 01/12] Try --- .github/workflows/publish.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index d4c0611336..22ac009071 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - test-publish permissions: id-token: write @@ -30,8 +31,12 @@ jobs: with: node-version: 22 registry-url: 'https://registry.npmjs.org' + - name: Log .npmrc after node setup + run: cat .npmrc - name: Setup Bun uses: ./.github/composite/setup-bun + - name: Log .npmrc after bun setup + run: cat .npmrc - name: Install dependencies run: bun install --frozen-lockfile env: From b1c0a25a72f4fbf245b131cf74d42bac5251cfd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 15 Nov 2025 23:54:11 +0100 Subject: [PATCH 02/12] Log more --- .github/workflows/publish.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 22ac009071..96ac4fbeb5 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -32,11 +32,13 @@ jobs: node-version: 22 registry-url: 'https://registry.npmjs.org' - name: Log .npmrc after node setup - run: cat .npmrc + run: cat ${NPM_CONFIG_USERCONFIG} + - name: Log token + run: echo ${NODE_AUTH_TOKEN} - name: Setup Bun uses: ./.github/composite/setup-bun - name: Log .npmrc after bun setup - run: cat .npmrc + run: cat ${NPM_CONFIG_USERCONFIG} - name: Install dependencies run: bun install --frozen-lockfile env: From 3a731c8599d54597d2416cdfbc889cc800e31ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 15 Nov 2025 23:56:39 +0100 Subject: [PATCH 03/12] Debug more --- .github/workflows/publish.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 96ac4fbeb5..d3860b3bbe 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -43,6 +43,8 @@ jobs: run: bun install --frozen-lockfile env: PUPPETEER_SKIP_DOWNLOAD: 1 + - name: Log .npmrc after bun install + run: cat ${NPM_CONFIG_USERCONFIG} - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -53,3 +55,4 @@ jobs: # Using a PAT instead of GITHUB_TOKEN because we need to run workflows when releases are created # https://github.com/orgs/community/discussions/26875#discussioncomment-3253761 GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} + NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }} From 570621c78f349364d5fda98bfbd816d1ceef6a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 15 Nov 2025 23:58:54 +0100 Subject: [PATCH 04/12] Pass more envs --- .github/workflows/publish.yaml | 9 +-------- scripts/publish-if-new.sh | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index d3860b3bbe..af96a21a4d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -31,20 +31,12 @@ jobs: with: node-version: 22 registry-url: 'https://registry.npmjs.org' - - name: Log .npmrc after node setup - run: cat ${NPM_CONFIG_USERCONFIG} - - name: Log token - run: echo ${NODE_AUTH_TOKEN} - name: Setup Bun uses: ./.github/composite/setup-bun - - name: Log .npmrc after bun setup - run: cat ${NPM_CONFIG_USERCONFIG} - name: Install dependencies run: bun install --frozen-lockfile env: PUPPETEER_SKIP_DOWNLOAD: 1 - - name: Log .npmrc after bun install - run: cat ${NPM_CONFIG_USERCONFIG} - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -56,3 +48,4 @@ jobs: # https://github.com/orgs/community/discussions/26875#discussioncomment-3253761 GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }} + NPM_CONFIG_USERCONFIG: ${{ env.NPM_CONFIG_USERCONFIG }} diff --git a/scripts/publish-if-new.sh b/scripts/publish-if-new.sh index 7dd18a5665..83ec41c41e 100755 --- a/scripts/publish-if-new.sh +++ b/scripts/publish-if-new.sh @@ -8,6 +8,9 @@ set -euo pipefail +echo "Node auth token: ${NODE_AUTH_TOKEN}" +echo "Npm config userconfig: ${NPM_CONFIG_USERCONFIG}" + NAME=$(node -p "require('./package.json').name") VERSION=$(node -p "require('./package.json').version") From 80b87c84582ac6957270996c6afbe3a0549b1509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:04:25 +0100 Subject: [PATCH 05/12] Log more --- scripts/publish-if-new.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/publish-if-new.sh b/scripts/publish-if-new.sh index 83ec41c41e..a62b4d85ad 100755 --- a/scripts/publish-if-new.sh +++ b/scripts/publish-if-new.sh @@ -8,8 +8,11 @@ set -euo pipefail -echo "Node auth token: ${NODE_AUTH_TOKEN}" -echo "Npm config userconfig: ${NPM_CONFIG_USERCONFIG}" +cat /home/runner/work/_temp/.npmrc +cat ~/.npmrc + +echo "Node auth token: ${NODE_AUTH_TOKEN:-not set}" +echo "Npm config userconfig: ${NPM_CONFIG_USERCONFIG:-not set}" NAME=$(node -p "require('./package.json').name") VERSION=$(node -p "require('./package.json').version") From cd1a2a34bcc46342135cd6563230bb77d5748511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:07:14 +0100 Subject: [PATCH 06/12] Try again --- .github/workflows/publish.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index af96a21a4d..7f291f9a16 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -37,15 +37,15 @@ jobs: run: bun install --frozen-lockfile env: PUPPETEER_SKIP_DOWNLOAD: 1 - - name: Create Release Pull Request or Publish to npm + - name: Create Release Pull Request id: changesets uses: changesets/action@v1 with: - publish: npm run publish-all-packages version: npm run changeset-version env: # Using a PAT instead of GITHUB_TOKEN because we need to run workflows when releases are created # https://github.com/orgs/community/discussions/26875#discussioncomment-3253761 GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} - NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }} - NPM_CONFIG_USERCONFIG: ${{ env.NPM_CONFIG_USERCONFIG }} + - name: Publish to NPM + if: steps.changesets.outputs.hasChangesets == 'false' + run: bun run publish-all-packages From 9bf4ecbe4b6c2ca1868aed622072443d42d62ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:08:40 +0100 Subject: [PATCH 07/12] Try again --- scripts/publish-if-new.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/publish-if-new.sh b/scripts/publish-if-new.sh index a62b4d85ad..07f92d42ba 100755 --- a/scripts/publish-if-new.sh +++ b/scripts/publish-if-new.sh @@ -8,9 +8,6 @@ set -euo pipefail -cat /home/runner/work/_temp/.npmrc -cat ~/.npmrc - echo "Node auth token: ${NODE_AUTH_TOKEN:-not set}" echo "Npm config userconfig: ${NPM_CONFIG_USERCONFIG:-not set}" @@ -43,4 +40,4 @@ fi # Clean up the tarball trap 'rm -f "${TARBALL_PATH}"' EXIT -npm publish "${TARBALL_PATH}" --no-workspaces --provenance +npm publish "${TARBALL_PATH}" --no-workspaces --provenance --dry-run From ae534e262bb1ee9380f98aa773b7f4725d927d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:10:32 +0100 Subject: [PATCH 08/12] Try again --- turbo.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index e36f300540..1b6fa6e843 100644 --- a/turbo.json +++ b/turbo.json @@ -56,7 +56,8 @@ // Publish the package to npm "publish-to-npm": { "dependsOn": ["build"], - "cache": false + "cache": false, + "env": ["NODE_AUTH_TOKEN", "NPM_CONFIG_USERCONFIG"] }, // Clean up the package "clean": { From e835c392aa1d0e484c4031a7096b51df3352fa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:12:41 +0100 Subject: [PATCH 09/12] Try the old way --- .github/workflows/publish.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 7f291f9a16..635ab4b1a8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -41,11 +41,12 @@ jobs: id: changesets uses: changesets/action@v1 with: - version: npm run changeset-version + publish: bun run publish-all-packages + version: bun run changeset-version env: # Using a PAT instead of GITHUB_TOKEN because we need to run workflows when releases are created # https://github.com/orgs/community/discussions/26875#discussioncomment-3253761 GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} - - name: Publish to NPM - if: steps.changesets.outputs.hasChangesets == 'false' - run: bun run publish-all-packages + # - name: Publish to NPM + # if: steps.changesets.outputs.hasChangesets == 'false' + # run: bun run publish-all-packages From 24e11b85eb811952ce56322f26373dba39070d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:15:32 +0100 Subject: [PATCH 10/12] Cleanup --- .github/workflows/publish.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 635ab4b1a8..3fcd9a0d8b 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - test-publish permissions: id-token: write @@ -47,6 +46,4 @@ jobs: # Using a PAT instead of GITHUB_TOKEN because we need to run workflows when releases are created # https://github.com/orgs/community/discussions/26875#discussioncomment-3253761 GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} - # - name: Publish to NPM - # if: steps.changesets.outputs.hasChangesets == 'false' - # run: bun run publish-all-packages + From 5ba3f9f10a00a94821e43c6843a300eedf80e6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:16:13 +0100 Subject: [PATCH 11/12] Cleanup more --- scripts/publish-if-new.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/publish-if-new.sh b/scripts/publish-if-new.sh index 07f92d42ba..7dd18a5665 100755 --- a/scripts/publish-if-new.sh +++ b/scripts/publish-if-new.sh @@ -8,9 +8,6 @@ set -euo pipefail -echo "Node auth token: ${NODE_AUTH_TOKEN:-not set}" -echo "Npm config userconfig: ${NPM_CONFIG_USERCONFIG:-not set}" - NAME=$(node -p "require('./package.json').name") VERSION=$(node -p "require('./package.json').version") @@ -40,4 +37,4 @@ fi # Clean up the tarball trap 'rm -f "${TARBALL_PATH}"' EXIT -npm publish "${TARBALL_PATH}" --no-workspaces --provenance --dry-run +npm publish "${TARBALL_PATH}" --no-workspaces --provenance From 44f12a2530ead867cd5ca8386cbc63f446e9e199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 16 Nov 2025 00:17:07 +0100 Subject: [PATCH 12/12] Revert title --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3fcd9a0d8b..cdbf15a8b8 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -36,7 +36,7 @@ jobs: run: bun install --frozen-lockfile env: PUPPETEER_SKIP_DOWNLOAD: 1 - - name: Create Release Pull Request + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 with: