Переглянути джерело

ci: trying to set npm config with auth_token

alvarosabu 1 рік тому
батько
коміт
a718570ea7
2 змінених файлів з 9 додано та 2 видалено
  1. 6 2
      .github/workflows/release.yml
  2. 3 0
      .release-it.json

+ 6 - 2
.github/workflows/release.yml

@@ -20,10 +20,14 @@ jobs:
         uses: pnpm/action-setup@v4
       - name: Use Node.js ${{ matrix.node-version }}
         uses: actions/setup-node@v4
-      - name: git config
+      - name: Initialize Git User
         run: |
           git config user.name "${GITHUB_ACTOR}"
-          git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
+          git config user.email "alvaro.saburido@gmail.com"
+      - name: Initialise the NPM config
+          run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
+          env:
+            NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
       - name: Install dependencies
         run: pnpm install
       - name: Release

+ 3 - 0
.release-it.json

@@ -12,6 +12,9 @@
       "infile": "CHANGELOG.md"
     }
   },
+  "npm": {
+    "publish": true
+  },
   "hooks": {
     "before:init": ["pnpm run lint", "pnpm test:ci"],
     "after:bump": "pnpm run build",