Skip to content

Commit 66dd0d6

Browse files
authored
1 parent cb6713d commit 66dd0d6

File tree

19 files changed

+71
-60
lines changed

19 files changed

+71
-60
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Release
44

55
on:
66
workflow_dispatch:
7+
inputs:
8+
release-pr:
9+
description: a release PR number to rerun release jobs on
10+
type: string
711
push:
812
branches:
913
- main
@@ -50,7 +54,7 @@ jobs:
5054
env:
5155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5256
run: |
53-
npx --offline template-oss-release-please ${{ github.ref_name }} ${{ github.event_name }}
57+
npx --offline template-oss-release-please "${{ github.ref_name }}" "${{ inputs.release-pr }}"
5458
- name: Post Pull Request Comment
5559
if: steps.release.outputs.pr-number
5660
uses: actions/github-script@v6
@@ -73,7 +77,7 @@ jobs:
7377
body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Update This Release\n\n`
7478
body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`latest\`. `
7579
body += `To force CI to update this PR, run this command:\n\n`
76-
body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME} -R ${owner}/${repo}\n\`\`\``
80+
body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME} -R ${owner}/${repo} -f release-pr=${issue_number}\n\`\`\``
7781
7882
if (commentId) {
7983
await github.rest.issues.updateComment({ owner, repo, comment_id: commentId, body })
@@ -285,14 +289,17 @@ jobs:
285289
}
286290
287291
const comments = await github.paginate(github.rest.issues.listComments, { owner, repo, issue_number })
288-
const releaseComments = comments.filter(c => c.user.login === 'github-actions[bot]' && c.body.includes('Release is at'))
292+
.then(cs => cs.map(c => ({ id: c.id, login: c.user.login, body: c.body })))
293+
console.log(`Found comments: ${JSON.stringify(comments, null, 2)}`)
294+
const releaseComments = comments.filter(c => c.login === 'github-actions[bot]' && c.body.includes('Release is at'))
289295
290296
for (const comment of releaseComments) {
297+
console.log(`Release comment: ${JSON.stringify(comment, null, 2)}`)
291298
await github.rest.issues.deleteComment({ owner, repo, comment_id: comment.id })
292299
}
293300
294301
const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${runId}`
295-
await github.rest.issues.createComment({
302+
await github.rest.issues.createComment({
296303
owner,
297304
repo,
298305
issue_number,
@@ -344,10 +351,14 @@ jobs:
344351
with:
345352
script: |
346353
const { PR_NUMBER: issue_number, RESULT } = process.env
347-
const { repo: { owner, repo } } = context
354+
const { runId, repo: { owner, repo } } = context
348355
349356
const comments = await github.paginate(github.rest.issues.listComments, { owner, repo, issue_number })
350-
const updateComment = comments.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith('## Release Workflow\n\n'))
357+
const updateComment = comments.find(c =>
358+
c.user.login === 'github-actions[bot]' &&
359+
c.body.startsWith('## Release Workflow\n\n') &&
360+
c.body.includes(runId)
361+
)
351362
352363
if (updateComment) {
353364
console.log('Found comment to update:', JSON.stringify(updateComment, null, 2))

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"devDependencies": {
2323
"@isaacs/string-locale-compare": "^1.1.0",
2424
"@npmcli/eslint-config": "^4.0.0",
25-
"@npmcli/template-oss": "4.11.3",
25+
"@npmcli/template-oss": "4.11.4",
2626
"front-matter": "^4.0.2",
2727
"ignore-walk": "^6.0.1",
2828
"jsdom": "^21.1.0",
@@ -55,7 +55,7 @@
5555
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
5656
"ciVersions": "latest",
5757
"engines": "^14.17.0 || ^16.13.0 || >=18.0.0",
58-
"version": "4.11.3",
58+
"version": "4.11.4",
5959
"content": "../scripts/template-oss/index.js",
6060
"workspaceRepo": {
6161
"add": {

mock-registry/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"templateOSS": {
3636
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
37-
"version": "4.11.3"
37+
"version": "4.11.4"
3838
},
3939
"tap": {
4040
"no-coverage": true,
@@ -46,7 +46,7 @@
4646
"devDependencies": {
4747
"@npmcli/arborist": "^6.1.1",
4848
"@npmcli/eslint-config": "^4.0.1",
49-
"@npmcli/template-oss": "4.11.3",
49+
"@npmcli/template-oss": "4.11.4",
5050
"nock": "^13.3.0",
5151
"npm-package-arg": "^10.1.0",
5252
"pacote": "^15.0.8",

package-lock.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
"@npmcli/git": "^4.0.1",
162162
"@npmcli/mock-registry": "^1.0.0",
163163
"@npmcli/promise-spawn": "^6.0.2",
164-
"@npmcli/template-oss": "4.11.3",
164+
"@npmcli/template-oss": "4.11.4",
165165
"licensee": "^10.0.0",
166166
"nock": "^13.3.0",
167167
"npm-packlist": "^7.0.4",
@@ -182,7 +182,7 @@
182182
"devDependencies": {
183183
"@isaacs/string-locale-compare": "^1.1.0",
184184
"@npmcli/eslint-config": "^4.0.0",
185-
"@npmcli/template-oss": "4.11.3",
185+
"@npmcli/template-oss": "4.11.4",
186186
"front-matter": "^4.0.2",
187187
"ignore-walk": "^6.0.1",
188188
"jsdom": "^21.1.0",
@@ -206,7 +206,7 @@
206206
"devDependencies": {
207207
"@npmcli/arborist": "^6.1.1",
208208
"@npmcli/eslint-config": "^4.0.1",
209-
"@npmcli/template-oss": "4.11.3",
209+
"@npmcli/template-oss": "4.11.4",
210210
"nock": "^13.3.0",
211211
"npm-package-arg": "^10.1.0",
212212
"pacote": "^15.0.8",
@@ -2218,9 +2218,9 @@
22182218
"link": true
22192219
},
22202220
"node_modules/@npmcli/template-oss": {
2221-
"version": "4.11.3",
2222-
"resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.3.tgz",
2223-
"integrity": "sha512-AEpwlpIXsiPUnM9gFHQHtXkyq1atSHL+bINSANPrR9SAwXSGchprbXRxZunlciWvEkX+GS99tbE6k65dbj8MgQ==",
2221+
"version": "4.11.4",
2222+
"resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.4.tgz",
2223+
"integrity": "sha512-PtUacQfLt5yl+OuUb9XW9Bw3ZGMwDnV5dCbtUVFr4J+Ig5RVMyDjB0VmI3Uu4v9ntBNBINzvNBP1Hb3UCzoA4Q==",
22242224
"dev": true,
22252225
"hasInstallScript": true,
22262226
"dependencies": {
@@ -14909,7 +14909,7 @@
1490914909
"@npmcli/eslint-config": "^4.0.0",
1491014910
"@npmcli/mock-registry": "^1.0.0",
1491114911
"@npmcli/promise-spawn": "^6.0.2",
14912-
"@npmcli/template-oss": "4.11.3",
14912+
"@npmcli/template-oss": "4.11.4",
1491314913
"http-proxy": "^1.18.1",
1491414914
"just-extend": "^6.2.0",
1491514915
"just-safe-set": "^4.2.1",
@@ -14964,7 +14964,7 @@
1496414964
},
1496514965
"devDependencies": {
1496614966
"@npmcli/eslint-config": "^4.0.0",
14967-
"@npmcli/template-oss": "4.11.3",
14967+
"@npmcli/template-oss": "4.11.4",
1496814968
"benchmark": "^2.1.4",
1496914969
"chalk": "^4.1.0",
1497014970
"minify-registry-metadata": "^3.0.0",
@@ -14992,7 +14992,7 @@
1499214992
},
1499314993
"devDependencies": {
1499414994
"@npmcli/eslint-config": "^4.0.0",
14995-
"@npmcli/template-oss": "4.11.3",
14995+
"@npmcli/template-oss": "4.11.4",
1499614996
"tap": "^16.3.4"
1499714997
},
1499814998
"engines": {
@@ -15009,7 +15009,7 @@
1500915009
"devDependencies": {
1501015010
"@npmcli/eslint-config": "^4.0.0",
1501115011
"@npmcli/mock-registry": "^1.0.0",
15012-
"@npmcli/template-oss": "4.11.3",
15012+
"@npmcli/template-oss": "4.11.4",
1501315013
"nock": "^13.3.0",
1501415014
"tap": "^16.3.4"
1501515015
},
@@ -15033,7 +15033,7 @@
1503315033
},
1503415034
"devDependencies": {
1503515035
"@npmcli/eslint-config": "^4.0.0",
15036-
"@npmcli/template-oss": "4.11.3",
15036+
"@npmcli/template-oss": "4.11.4",
1503715037
"tap": "^16.3.4"
1503815038
},
1503915039
"engines": {
@@ -15060,7 +15060,7 @@
1506015060
"devDependencies": {
1506115061
"@npmcli/eslint-config": "^4.0.0",
1506215062
"@npmcli/mock-registry": "^1.0.0",
15063-
"@npmcli/template-oss": "4.11.3",
15063+
"@npmcli/template-oss": "4.11.4",
1506415064
"bin-links": "^4.0.1",
1506515065
"just-extend": "^6.2.0",
1506615066
"just-safe-set": "^4.2.1",
@@ -15079,7 +15079,7 @@
1507915079
},
1508015080
"devDependencies": {
1508115081
"@npmcli/eslint-config": "^4.0.0",
15082-
"@npmcli/template-oss": "4.11.3",
15082+
"@npmcli/template-oss": "4.11.4",
1508315083
"tap": "^16.3.4"
1508415084
},
1508515085
"engines": {
@@ -15095,7 +15095,7 @@
1509515095
},
1509615096
"devDependencies": {
1509715097
"@npmcli/eslint-config": "^4.0.0",
15098-
"@npmcli/template-oss": "4.11.3",
15098+
"@npmcli/template-oss": "4.11.4",
1509915099
"nock": "^13.3.0",
1510015100
"tap": "^16.3.4"
1510115101
},
@@ -15112,7 +15112,7 @@
1511215112
},
1511315113
"devDependencies": {
1511415114
"@npmcli/eslint-config": "^4.0.0",
15115-
"@npmcli/template-oss": "4.11.3",
15115+
"@npmcli/template-oss": "4.11.4",
1511615116
"minipass": "^4.0.2",
1511715117
"nock": "^13.3.0",
1511815118
"tap": "^16.3.4"
@@ -15132,7 +15132,7 @@
1513215132
},
1513315133
"devDependencies": {
1513415134
"@npmcli/eslint-config": "^4.0.0",
15135-
"@npmcli/template-oss": "4.11.3",
15135+
"@npmcli/template-oss": "4.11.4",
1513615136
"nock": "^13.3.0",
1513715137
"spawk": "^1.7.1",
1513815138
"tap": "^16.3.4"
@@ -15154,7 +15154,7 @@
1515415154
"devDependencies": {
1515515155
"@npmcli/eslint-config": "^4.0.0",
1515615156
"@npmcli/mock-registry": "^1.0.0",
15157-
"@npmcli/template-oss": "4.11.3",
15157+
"@npmcli/template-oss": "4.11.4",
1515815158
"lodash.clonedeep": "^4.5.0",
1515915159
"nock": "^13.3.0",
1516015160
"tap": "^16.3.4"
@@ -15171,7 +15171,7 @@
1517115171
},
1517215172
"devDependencies": {
1517315173
"@npmcli/eslint-config": "^4.0.0",
15174-
"@npmcli/template-oss": "4.11.3",
15174+
"@npmcli/template-oss": "4.11.4",
1517515175
"nock": "^13.3.0",
1517615176
"tap": "^16.3.4"
1517715177
},
@@ -15188,7 +15188,7 @@
1518815188
},
1518915189
"devDependencies": {
1519015190
"@npmcli/eslint-config": "^4.0.0",
15191-
"@npmcli/template-oss": "4.11.3",
15191+
"@npmcli/template-oss": "4.11.4",
1519215192
"nock": "^13.3.0",
1519315193
"tap": "^16.3.4"
1519415194
},
@@ -15208,7 +15208,7 @@
1520815208
},
1520915209
"devDependencies": {
1521015210
"@npmcli/eslint-config": "^4.0.0",
15211-
"@npmcli/template-oss": "4.11.3",
15211+
"@npmcli/template-oss": "4.11.4",
1521215212
"require-inject": "^1.4.4",
1521315213
"tap": "^16.3.4"
1521415214
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"@npmcli/git": "^4.0.1",
195195
"@npmcli/mock-registry": "^1.0.0",
196196
"@npmcli/promise-spawn": "^6.0.2",
197-
"@npmcli/template-oss": "4.11.3",
197+
"@npmcli/template-oss": "4.11.4",
198198
"licensee": "^10.0.0",
199199
"nock": "^13.3.0",
200200
"npm-packlist": "^7.0.4",
@@ -248,7 +248,7 @@
248248
},
249249
"templateOSS": {
250250
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
251-
"version": "4.11.3",
251+
"version": "4.11.4",
252252
"content": "./scripts/template-oss/root.js"
253253
},
254254
"license": "Artistic-2.0",

smoke-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@npmcli/eslint-config": "^4.0.0",
2222
"@npmcli/mock-registry": "^1.0.0",
2323
"@npmcli/promise-spawn": "^6.0.2",
24-
"@npmcli/template-oss": "4.11.3",
24+
"@npmcli/template-oss": "4.11.4",
2525
"http-proxy": "^1.18.1",
2626
"just-extend": "^6.2.0",
2727
"just-safe-set": "^4.2.1",
@@ -32,7 +32,7 @@
3232
"license": "ISC",
3333
"templateOSS": {
3434
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
35-
"version": "4.11.3",
35+
"version": "4.11.4",
3636
"content": "../scripts/template-oss/index.js"
3737
},
3838
"tap": {

workspaces/arborist/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"devDependencies": {
4141
"@npmcli/eslint-config": "^4.0.0",
42-
"@npmcli/template-oss": "4.11.3",
42+
"@npmcli/template-oss": "4.11.4",
4343
"benchmark": "^2.1.4",
4444
"chalk": "^4.1.0",
4545
"minify-registry-metadata": "^3.0.0",
@@ -98,7 +98,7 @@
9898
},
9999
"templateOSS": {
100100
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
101-
"version": "4.11.3",
101+
"version": "4.11.4",
102102
"content": "../../scripts/template-oss/index.js"
103103
}
104104
}

workspaces/config/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"devDependencies": {
3535
"@npmcli/eslint-config": "^4.0.0",
36-
"@npmcli/template-oss": "4.11.3",
36+
"@npmcli/template-oss": "4.11.4",
3737
"tap": "^16.3.4"
3838
},
3939
"dependencies": {
@@ -50,6 +50,6 @@
5050
},
5151
"templateOSS": {
5252
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
53-
"version": "4.11.3"
53+
"version": "4.11.4"
5454
}
5555
}

workspaces/libnpmaccess/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"devDependencies": {
1818
"@npmcli/eslint-config": "^4.0.0",
1919
"@npmcli/mock-registry": "^1.0.0",
20-
"@npmcli/template-oss": "4.11.3",
20+
"@npmcli/template-oss": "4.11.4",
2121
"nock": "^13.3.0",
2222
"tap": "^16.3.4"
2323
},
@@ -41,7 +41,7 @@
4141
],
4242
"templateOSS": {
4343
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
44-
"version": "4.11.3",
44+
"version": "4.11.4",
4545
"content": "../../scripts/template-oss/index.js"
4646
},
4747
"tap": {

workspaces/libnpmdiff/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"devDependencies": {
4444
"@npmcli/eslint-config": "^4.0.0",
45-
"@npmcli/template-oss": "4.11.3",
45+
"@npmcli/template-oss": "4.11.4",
4646
"tap": "^16.3.4"
4747
},
4848
"dependencies": {
@@ -58,7 +58,7 @@
5858
},
5959
"templateOSS": {
6060
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
61-
"version": "4.11.3",
61+
"version": "4.11.4",
6262
"content": "../../scripts/template-oss/index.js"
6363
},
6464
"tap": {

workspaces/libnpmexec/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"devDependencies": {
5353
"@npmcli/eslint-config": "^4.0.0",
5454
"@npmcli/mock-registry": "^1.0.0",
55-
"@npmcli/template-oss": "4.11.3",
55+
"@npmcli/template-oss": "4.11.4",
5656
"bin-links": "^4.0.1",
5757
"just-extend": "^6.2.0",
5858
"just-safe-set": "^4.2.1",
@@ -75,7 +75,7 @@
7575
},
7676
"templateOSS": {
7777
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
78-
"version": "4.11.3",
78+
"version": "4.11.4",
7979
"content": "../../scripts/template-oss/index.js"
8080
}
8181
}

0 commit comments

Comments
 (0)