Skip to content

Merge pull request #8 from YashVerma-code/conflictfix #6

Merge pull request #8 from YashVerma-code/conflictfix

Merge pull request #8 from YashVerma-code/conflictfix #6

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Build project (optional)
run: npm run build --if-present
- name: Bump version
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
npm version patch -m "chore: bump version to %s [skip ci]"
git push origin main --follow-tags
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}