chore: update GitHub Actions workflow to use custom actions and chang… #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: NPM Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: developer-sumit/checkout@v2 | |
| - name: Set up Node.js | |
| uses: developer-sumit/setup-node@v2 | |
| with: | |
| node-version: "14" # Specify the Node.js version you want to use | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Publish to NPM | |
| run: npm publish | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |