diff --git a/.changeset/fix-npm-auth.md b/.changeset/fix-npm-auth.md new file mode 100644 index 0000000..a0548fd --- /dev/null +++ b/.changeset/fix-npm-auth.md @@ -0,0 +1,5 @@ +--- +"@scope3/agentic-client": patch +--- + +Fix npm authentication in release workflow by manually configuring .npmrc file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9955be..6c35ea4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci @@ -33,6 +32,12 @@ jobs: - 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 @@ -43,3 +48,4 @@ jobs: title: 'chore: version packages' env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}