diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a734fed2..8f5372bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,8 @@ jobs: needs: build_and_test if: github.ref == 'refs/heads/master' uses: ./.github/workflows/release.yml + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} deploy_docs: needs: build_and_test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c942e93..4012ecf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,9 @@ name: Release/Publish -on: workflow_call +on: + workflow_call: + secrets: + NPM_TOKEN: + required: true concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: @@ -16,19 +20,8 @@ jobs: cache: 'npm' cache-dependency-path: '**/package-lock.json' node-version: '18' - registry-url: 'https://registry.npmjs.org' - run: npm ci --prefer-offline - - run: | - set -ex - git config color.status always - env - hostname - whoami - node --version - npm --version - cat ~/.npmrc || true - - name: Create a Release Pull Request or Publish to Registry id: changesets uses: changesets/action@v1 @@ -38,17 +31,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - run: | - set -ex - git config color.status always - env - hostname - whoami - node --version - npm --version - cat ~/.npmrc || true - name: Publish Released Documentation if: steps.changesets.outputs.published == 'true' diff --git a/package.json b/package.json index 61c40d4b..b73c778e 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,6 @@ "require": "./dist/index.cjs", "browser": "./dist/index.umd.js" }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, "files": [ "dist/*", "src/*",