From 0b156779637623eeb4f3c006220828d80e79de09 Mon Sep 17 00:00:00 2001 From: PranavBarthwal Date: Sun, 6 Oct 2024 16:12:28 +0530 Subject: [PATCH] fix workfl9ow --- .github/workflows/publish.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8b2d310..77266b4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,21 +16,27 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '16' registry-url: 'https://registry.npmjs.org/' - name: Install dependencies run: npm install - - name: Bump version + + - name: Commit uncommitted changes run: | - npm version patch # Automatically bump the patch version git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git commit -am "chore(release): bump version" # Commit the version bump - git push origin main # Push the changes to GitHub + git add . # Add all uncommitted changes + git commit -m "chore: commit uncommitted changes" || echo "No changes to commit" + + - name: Bump version + run: | + npm version patch # Automatically bump the patch version + git push origin main # Push the version bump to GitHub - name: Publish to npm run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +