Skip to content

Commit 6b1e73e

Browse files
authored
chore: Fix publish by setting npm provenance and nulling auth (#1867)
Based on this issue: changesets/changesets#1914 And this one: changesets/changesets#1152
1 parent 06149af commit 6b1e73e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/publish-js-sdk.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ concurrency:
2222

2323
env:
2424
HUSKY: "0"
25+
NPM_CONFIG_PROVENANCE: "true"
2526

2627
jobs:
2728
stable-release:
@@ -55,6 +56,8 @@ jobs:
5556
run: pnpm run build
5657
- name: Publish stable packages to npm
5758
if: steps.detect.outputs.needs_publish == 'true'
59+
env:
60+
NODE_AUTH_TOKEN: ""
5861
run: pnpm exec changeset publish
5962
- name: Push Changesets release tags
6063
if: steps.detect.outputs.has_work == 'true'
@@ -135,6 +138,7 @@ jobs:
135138
permissions:
136139
contents: read
137140
id-token: write
141+
environment: npm-publish
138142
steps:
139143
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
140144
with:
@@ -162,6 +166,8 @@ jobs:
162166
run: pnpm run build
163167
- name: Publish prerelease packages to npm
164168
if: steps.manifest.outputs.has_packages == 'true'
169+
env:
170+
NODE_AUTH_TOKEN: ""
165171
run: pnpm exec changeset publish --tag rc --no-git-tag
166172
- name: Post prerelease to Slack
167173
if: steps.manifest.outputs.has_packages == 'true'

0 commit comments

Comments
 (0)