Skip to content

Commit e7581b6

Browse files
authored
Merge pull request #76 from linearis-oss/fix/publish-granular-token
fix(ci): restore token auth with provenance for npm publishing
2 parents a8d978b + cd12d3f commit e7581b6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@ jobs:
4444
fi
4545
echo "Version check passed: $PACKAGE_VERSION"
4646
47-
# Do not use registry-url — it creates an .npmrc with a token
48-
# placeholder that would bypass OIDC trusted publishing.
4947
- name: Setup Node.js
5048
uses: actions/setup-node@v4
5149
with:
5250
node-version: "22"
51+
registry-url: "https://registry.npmjs.org"
5352

5453
- name: Clean install
5554
run: npm install
@@ -62,6 +61,8 @@ jobs:
6261

6362
- name: Publish to npm
6463
run: npm publish --provenance --access public
64+
env:
65+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6566

6667
- name: Verify publish success
6768
run: |

0 commit comments

Comments
 (0)