Skip to content

Commit 8afef45

Browse files
committed
feat(create-release-pr-for-npm): add inputs version-file-path
1 parent e8f12c5 commit 8afef45

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • .github/actions/create-release-pr-for-npm

.github/actions/create-release-pr-for-npm/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
base-branch:
55
required: true
66
description: The base branch
7+
version-file-path:
8+
description: The path to the version file. ex. lib/my_npm/package.json
9+
default: 'package.json'
710
commit-user-email:
811
description: The email address of the user who created the commit
912
default: "41898282+github-actions[bot]@users.noreply.github.com"
@@ -44,8 +47,8 @@ runs:
4447
git config --local user.email "${{ inputs.commit-user-email }}"
4548
git config --local user.name "${{ inputs.commit-user-name }}"
4649
git checkout -b release/${{ inputs.tag-prefix }}$VERSION
47-
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
48-
git add package.json
50+
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" ${{ inputs.version-file-path }}
51+
git add ${{ inputs.version-file-path }}
4952
git commit -m "chore: bump version to v$VERSION"
5053
git push origin release/${{ inputs.tag-prefix }}$VERSION
5154
shell: bash

0 commit comments

Comments
 (0)