diff --git a/.github/workflows/build_and_publish.yaml b/.github/workflows/build_and_publish.yaml index 4c7a2d5..234eb14 100644 --- a/.github/workflows/build_and_publish.yaml +++ b/.github/workflows/build_and_publish.yaml @@ -17,19 +17,19 @@ jobs: uses: actions/checkout@v3 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20.12.2' - + registry-url: 'https://registry.npmjs.org' + token: ${{ secrets.NPM_TOKEN }} - name: Install dependencies - run: npm install + run: npm ci - name: Build the project run: npm run build - name: Publish to npm if: github.event_name == 'push' && github.ref == 'refs/heads/master' + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - npm publish