Skip to content

Commit 42e3b14

Browse files
committed
fix: use npm token for automated publish
1 parent fd8df77 commit 42e3b14

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/rust-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ jobs:
175175
permissions:
176176
id-token: write
177177
contents: read
178+
env:
179+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
178180

179181
steps:
180182
- uses: actions/checkout@v6
@@ -189,6 +191,16 @@ jobs:
189191
- name: Update npm
190192
run: npm install -g npm@latest
191193

194+
- name: Verify npm auth configuration
195+
shell: bash
196+
run: |
197+
set -euo pipefail
198+
if [[ -n "${NODE_AUTH_TOKEN:-}" ]]; then
199+
echo "Using NPM_TOKEN secret for automated publish."
200+
else
201+
echo "NPM_TOKEN secret is not set; falling back to npm trusted publishing."
202+
fi
203+
192204
- name: Download Linux x64 artifact
193205
uses: actions/download-artifact@v8
194206
with:

0 commit comments

Comments
 (0)