@@ -1058,6 +1058,8 @@ on:
10581058 branches:
10591059 - main
10601060 - latest
1061+ permissions:
1062+ contents: write
10611063
10621064jobs:
10631065 release-please:
@@ -1076,7 +1078,29 @@ jobs:
10761078 {"type":"docs","section":"Documentation","hidden":false},
10771079 {"type":"deps","section":"Dependencies","hidden":false},
10781080 {"type":"chore","hidden":true}
1079- ]
1081+ ] - uses: actions/checkout@v3
1082+ - name: Setup git user
1083+ run: |
1084+ git config --global user.email "[email protected] " 1085+ git config --global user.name "npm cli ops bot"
1086+ - uses: actions/setup-node@v3
1087+ with:
1088+ node-version: 16.x
1089+ - name: Update npm to latest
1090+ run: npm i --prefer-online --no-fund --no-audit -g npm@latest
1091+ - run: npm -v
1092+ - name: Update package-lock.json and commit
1093+ if: steps.release.outputs.pr
1094+ env:
1095+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
1096+ run: |
1097+ gh pr checkout \${{ fromJSON(steps.release.outputs.pr).number }}
1098+ npm run resetdeps
1099+ title="\${{ fromJSON(steps.release.outputs.pr).title }}"
1100+ # get the version from the pr title
1101+ # get everything after the last space
1102+ git commit -am "deps: bbb@\${title##* }"
1103+ git push
10801104
10811105.github/workflows/release-please-name-aaaa.yml
10821106========================================
@@ -1091,6 +1115,8 @@ on:
10911115 branches:
10921116 - main
10931117 - latest
1118+ permissions:
1119+ contents: write
10941120
10951121jobs:
10961122 release-please:
@@ -1109,7 +1135,29 @@ jobs:
11091135 {"type":"docs","section":"Documentation","hidden":false},
11101136 {"type":"deps","section":"Dependencies","hidden":false},
11111137 {"type":"chore","hidden":true}
1112- ]
1138+ ] - uses: actions/checkout@v3
1139+ - name: Setup git user
1140+ run: |
1141+ git config --global user.email "[email protected] " 1142+ git config --global user.name "npm cli ops bot"
1143+ - uses: actions/setup-node@v3
1144+ with:
1145+ node-version: 16.x
1146+ - name: Update npm to latest
1147+ run: npm i --prefer-online --no-fund --no-audit -g npm@latest
1148+ - run: npm -v
1149+ - name: Update package-lock.json and commit
1150+ if: steps.release.outputs.pr
1151+ env:
1152+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
1153+ run: |
1154+ gh pr checkout \${{ fromJSON(steps.release.outputs.pr).number }}
1155+ npm run resetdeps
1156+ title="\${{ fromJSON(steps.release.outputs.pr).title }}"
1157+ # get the version from the pr title
1158+ # get everything after the last space
1159+ git commit -am "deps: @name/aaaa@\${title##* }"
1160+ git push
11131161
11141162.github/workflows/release-please.yml
11151163========================================
0 commit comments