Skip to content

Commit 54d046d

Browse files
author
fspec
committed
fix(ci): use --skip-optional-publish and --provenance for Trusted Publishing
1 parent b7760cf commit 54d046d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build-codelet-napi.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,17 @@ jobs:
209209
working-directory: codelet/napi
210210

211211
- name: Generate platform packages
212-
run: npx napi prepublish -t npm
212+
run: npx napi prepublish -t npm --skip-optional-publish
213213
working-directory: codelet/napi
214214
env:
215215
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
216-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
217216

218217
- name: List packages
219218
run: ls -la npm
220219
working-directory: codelet/napi
221220

222221
- name: Publish main package
223-
run: npm publish --access public
222+
run: npm publish --access public --provenance
224223
working-directory: codelet/napi
225224
env:
226225
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -231,7 +230,7 @@ jobs:
231230
if [ -d "$pkg" ]; then
232231
echo "Publishing $pkg..."
233232
cd "$pkg"
234-
npm publish --access public
233+
npm publish --access public --provenance
235234
cd ../..
236235
fi
237236
done

0 commit comments

Comments
 (0)