Version Bump #6
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 Registry Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Node.js Environment setup | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org/' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Run test before publish | |
| run: npm test | |
| - name: Build project | |
| run: npm run build | |
| - name: Version patch and push | |
| run: | | |
| git config user.name "${{ secrets.ACTION_GIT_USER_NAME }}" | |
| git config user.email "${{ secrets.ACTION_GIT_USER_EMAIL }}" | |
| yarn version --patch -m "chore(release): %s" | |
| git push origin HEAD | |
| - name: Publish to registry | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm publish --access public |