diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e4b726f..10c98ff 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,9 +11,6 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - with: - scope: ${{ github.repository_owner }} - registry-url: https://npm.pkg.github.com - name: Create a package called @${{ github.repository }} run: npm init --scope ${{ github.repository_owner }} -y @@ -28,9 +25,12 @@ jobs: run: npm pack - name: Publish the package - run: npm publish + run: | + echo '//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} + @${{ github.repository_owner }}:registry=https://npm.pkg.github.com' > .npmrc + npm publish env: - NODE_AUTH_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ github.token }} - run: gh api repos/${{ github.repository_owner }}/npm-install/dispatches <<< '{"event_type":"build"}' --input - env: