@@ -1056,6 +1056,8 @@ on:
10561056 branches:
10571057 - main
10581058 - latest
1059+ permissions:
1060+ contents: write
10591061
10601062jobs:
10611063 release-please:
@@ -1077,7 +1079,29 @@ jobs:
10771079 {"type":"docs","section":"Documentation","hidden":false},
10781080 {"type":"deps","section":"Dependencies","hidden":false},
10791081 {"type":"chore","hidden":true}
1080- ]
1082+ ] - uses: actions/checkout@v3
1083+ - name: Setup git user
1084+ run: |
1085+ git config --global user.email "[email protected] " 1086+ git config --global user.name "npm cli ops bot"
1087+ - uses: actions/setup-node@v3
1088+ with:
1089+ node-version: 16.x
1090+ - name: Update npm to latest
1091+ run: npm i --prefer-online --no-fund --no-audit -g npm@latest
1092+ - run: npm -v
1093+ - name: Update package-lock.json and commit
1094+ if: steps.release.outputs.pr
1095+ env:
1096+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
1097+ run: |
1098+ gh pr checkout \${{ fromJSON(steps.release.outputs.pr).number }}
1099+ npm run resetdeps
1100+ title="\${{ fromJSON(steps.release.outputs.pr).title }}"
1101+ # get the version from the pr title
1102+ # get everything after the last space
1103+ git commit -am "deps: bbb@\${title##* }"
1104+ git push
10811105
10821106.github/workflows/release-please-name-aaaa.yml
10831107========================================
@@ -1092,6 +1116,8 @@ on:
10921116 branches:
10931117 - main
10941118 - latest
1119+ permissions:
1120+ contents: write
10951121
10961122jobs:
10971123 release-please:
@@ -1113,7 +1139,29 @@ jobs:
11131139 {"type":"docs","section":"Documentation","hidden":false},
11141140 {"type":"deps","section":"Dependencies","hidden":false},
11151141 {"type":"chore","hidden":true}
1116- ]
1142+ ] - uses: actions/checkout@v3
1143+ - name: Setup git user
1144+ run: |
1145+ git config --global user.email "[email protected] " 1146+ git config --global user.name "npm cli ops bot"
1147+ - uses: actions/setup-node@v3
1148+ with:
1149+ node-version: 16.x
1150+ - name: Update npm to latest
1151+ run: npm i --prefer-online --no-fund --no-audit -g npm@latest
1152+ - run: npm -v
1153+ - name: Update package-lock.json and commit
1154+ if: steps.release.outputs.pr
1155+ env:
1156+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
1157+ run: |
1158+ gh pr checkout \${{ fromJSON(steps.release.outputs.pr).number }}
1159+ npm run resetdeps
1160+ title="\${{ fromJSON(steps.release.outputs.pr).title }}"
1161+ # get the version from the pr title
1162+ # get everything after the last space
1163+ git commit -am "deps: @name/aaaa@\${title##* }"
1164+ git push
11171165
11181166.github/workflows/release-please.yml
11191167========================================
0 commit comments