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 6c35ea4..e52c426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 }} diff --git a/package.json b/package.json index 0d01a39..46e50bb 100644 --- a/package.json +++ b/package.json @@ -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",