Skip to content

Commit 1df9441

Browse files
fix: fix the issue of trying to add package-lock.json file which doesnot exist
1 parent 1931279 commit 1df9441

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/update-and-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ jobs:
6969
current-version: ${{ env.latest_version }}
7070
version-fragment: ${{ steps.release_type.outputs.lowercase }}
7171

72-
- name: Update version in package.json and package-lock.json
72+
- name: Update version in package.json and yarn.lock
7373
run: |
7474
OLD_VERSION=${{ env.latest_version }}
7575
NEW_VERSION=${{ steps.get_next_version.outputs.next-version }}
7676
7777
npm version $NEW_VERSION --no-git-tag-version
7878
git config user.name github-actions
7979
git config user.email github-actions@github.com
80-
git add package.json package-lock.json
80+
git add package.json yarn.lock
8181
git commit -m "Bump version from $OLD_VERSION to $NEW_VERSION"
8282
git push origin HEAD:main
8383
@@ -88,9 +88,9 @@ jobs:
8888
run: npm publish --access public --//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
8989
if: success()
9090

91-
- name: Revert package.json and package-lock.json
91+
- name: Revert package.json and yarn.lock
9292
run: |
93-
# Revert package.json and package-lock.json to the previous version
93+
# Revert package.json and yarn.lock to the previous version
9494
npm version ${{ env.latest_version }} --no-git-tag-version
9595
git commit -am "Revert to version ${{ env.latest_version }}"
9696
git push origin HEAD:main

0 commit comments

Comments
 (0)