File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 1010 required : true
1111 default : patch
1212
13+ permissions :
14+ contents : write
15+ pull-requests : write
16+
1317jobs :
1418 publish :
1519 runs-on : ubuntu-latest
@@ -88,10 +92,23 @@ jobs:
8892 package.json > _tmp.json && mv _tmp.json package.json
8993 npm install --package-lock-only
9094
91- - name : Commit version bump
95+ - name : Commit version bump and create PR
9296 run : |
9397 git config user.name "github-actions[bot]"
9498 git config user.email "github-actions[bot]@users.noreply.github.com"
99+ BRANCH="chore/bump-npm-v${{ steps.version_docsgpt.outputs.version }}"
100+ git checkout -b "$BRANCH"
95101 git add package.json package-lock.json
96102 git commit -m "chore: bump npm libraries to v${{ steps.version_docsgpt.outputs.version }}"
97- git push
103+ git push origin "$BRANCH"
104+ env :
105+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106+
107+ - name : Create PR
108+ run : |
109+ gh pr create \
110+ --title "chore: bump npm libraries to v${{ steps.version_docsgpt.outputs.version }}" \
111+ --body "Automated version bump after npm publish." \
112+ --base main
113+ env :
114+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments