Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-npm-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scope3/agentic-client": patch
---

Fix npm authentication in release workflow by manually configuring .npmrc file
16 changes: 4 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,18 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Configure npm authentication
run: |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -47,5 +40,4 @@ jobs:
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pretest": "npm run type-check",
"changeset": "changeset",
"version": "changeset version",
"release": "npm run build && changeset publish"
"release": "npm run build && npm publish"
},
"keywords": [
"scope3",
Expand Down