Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: Release

on:
workflow_dispatch:
inputs:
release-pr:
description: a release PR number to rerun release jobs on
type: string
push:
branches:
- main
Expand Down Expand Up @@ -50,7 +54,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx --offline template-oss-release-please ${{ github.ref_name }} ${{ github.event_name }}
npx --offline template-oss-release-please "${{ github.ref_name }}" "${{ inputs.release-pr }}"
- name: Post Pull Request Comment
if: steps.release.outputs.pr-number
uses: actions/github-script@v6
Expand All @@ -73,7 +77,7 @@ jobs:
body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Update This Release\n\n`
body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`latest\`. `
body += `To force CI to update this PR, run this command:\n\n`
body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME} -R ${owner}/${repo}\n\`\`\``
body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME} -R ${owner}/${repo} -f release-pr=${issue_number}\n\`\`\``

if (commentId) {
await github.rest.issues.updateComment({ owner, repo, comment_id: commentId, body })
Expand Down Expand Up @@ -285,14 +289,17 @@ jobs:
}

const comments = await github.paginate(github.rest.issues.listComments, { owner, repo, issue_number })
const releaseComments = comments.filter(c => c.user.login === 'github-actions[bot]' && c.body.includes('Release is at'))
.then(cs => cs.map(c => ({ id: c.id, login: c.user.login, body: c.body })))
console.log(`Found comments: ${JSON.stringify(comments, null, 2)}`)
const releaseComments = comments.filter(c => c.login === 'github-actions[bot]' && c.body.includes('Release is at'))

for (const comment of releaseComments) {
console.log(`Release comment: ${JSON.stringify(comment, null, 2)}`)
await github.rest.issues.deleteComment({ owner, repo, comment_id: comment.id })
}

const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${runId}`
await github.rest.issues.createComment({
await github.rest.issues.createComment({
owner,
repo,
issue_number,
Expand Down Expand Up @@ -344,10 +351,14 @@ jobs:
with:
script: |
const { PR_NUMBER: issue_number, RESULT } = process.env
const { repo: { owner, repo } } = context
const { runId, repo: { owner, repo } } = context

const comments = await github.paginate(github.rest.issues.listComments, { owner, repo, issue_number })
const updateComment = comments.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith('## Release Workflow\n\n'))
const updateComment = comments.find(c =>
c.user.login === 'github-actions[bot]' &&
c.body.startsWith('## Release Workflow\n\n') &&
c.body.includes(runId)
)

if (updateComment) {
console.log('Found comment to update:', JSON.stringify(updateComment, null, 2))
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"front-matter": "^4.0.2",
"ignore-walk": "^6.0.1",
"jsdom": "^21.1.0",
Expand Down Expand Up @@ -55,7 +55,7 @@
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"ciVersions": "latest",
"engines": "^14.17.0 || ^16.13.0 || >=18.0.0",
"version": "4.11.3",
"version": "4.11.4",
"content": "../scripts/template-oss/index.js",
"workspaceRepo": {
"add": {
Expand Down
4 changes: 2 additions & 2 deletions mock-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3"
"version": "4.11.4"
},
"tap": {
"no-coverage": true,
Expand All @@ -46,7 +46,7 @@
"devDependencies": {
"@npmcli/arborist": "^6.1.1",
"@npmcli/eslint-config": "^4.0.1",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"npm-package-arg": "^10.1.0",
"pacote": "^15.0.8",
Expand Down
40 changes: 20 additions & 20 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"@npmcli/git": "^4.0.1",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/promise-spawn": "^6.0.2",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"licensee": "^10.0.0",
"nock": "^13.3.0",
"npm-packlist": "^7.0.4",
Expand All @@ -182,7 +182,7 @@
"devDependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"front-matter": "^4.0.2",
"ignore-walk": "^6.0.1",
"jsdom": "^21.1.0",
Expand All @@ -206,7 +206,7 @@
"devDependencies": {
"@npmcli/arborist": "^6.1.1",
"@npmcli/eslint-config": "^4.0.1",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"npm-package-arg": "^10.1.0",
"pacote": "^15.0.8",
Expand Down Expand Up @@ -2273,9 +2273,9 @@
"link": true
},
"node_modules/@npmcli/template-oss": {
"version": "4.11.3",
"resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.3.tgz",
"integrity": "sha512-AEpwlpIXsiPUnM9gFHQHtXkyq1atSHL+bINSANPrR9SAwXSGchprbXRxZunlciWvEkX+GS99tbE6k65dbj8MgQ==",
"version": "4.11.4",
"resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.4.tgz",
"integrity": "sha512-PtUacQfLt5yl+OuUb9XW9Bw3ZGMwDnV5dCbtUVFr4J+Ig5RVMyDjB0VmI3Uu4v9ntBNBINzvNBP1Hb3UCzoA4Q==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
Expand Down Expand Up @@ -14432,7 +14432,7 @@
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/promise-spawn": "^6.0.2",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"http-proxy": "^1.18.1",
"just-extend": "^6.2.0",
"just-safe-set": "^4.2.1",
Expand Down Expand Up @@ -14487,7 +14487,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"benchmark": "^2.1.4",
"chalk": "^4.1.0",
"minify-registry-metadata": "^3.0.0",
Expand Down Expand Up @@ -14515,7 +14515,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"tap": "^16.3.4"
},
"engines": {
Expand All @@ -14532,7 +14532,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"tap": "^16.3.4"
},
Expand All @@ -14556,7 +14556,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"tap": "^16.3.4"
},
"engines": {
Expand All @@ -14583,7 +14583,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"bin-links": "^4.0.1",
"just-extend": "^6.2.0",
"just-safe-set": "^4.2.1",
Expand All @@ -14602,7 +14602,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"tap": "^16.3.4"
},
"engines": {
Expand All @@ -14618,7 +14618,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"tap": "^16.3.4"
},
Expand All @@ -14635,7 +14635,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"minipass": "^4.0.2",
"nock": "^13.3.0",
"tap": "^16.3.4"
Expand All @@ -14655,7 +14655,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"spawk": "^1.7.1",
"tap": "^16.3.4"
Expand All @@ -14677,7 +14677,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"lodash.clonedeep": "^4.5.0",
"nock": "^13.3.0",
"tap": "^16.3.4"
Expand All @@ -14694,7 +14694,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"tap": "^16.3.4"
},
Expand All @@ -14711,7 +14711,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"tap": "^16.3.4"
},
Expand All @@ -14731,7 +14731,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"require-inject": "^1.4.4",
"tap": "^16.3.4"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"@npmcli/git": "^4.0.1",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/promise-spawn": "^6.0.2",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"licensee": "^10.0.0",
"nock": "^13.3.0",
"npm-packlist": "^7.0.4",
Expand Down Expand Up @@ -248,7 +248,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "./scripts/template-oss/root.js"
},
"license": "Artistic-2.0",
Expand Down
4 changes: 2 additions & 2 deletions smoke-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/promise-spawn": "^6.0.2",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"http-proxy": "^1.18.1",
"just-extend": "^6.2.0",
"just-safe-set": "^4.2.1",
Expand All @@ -32,7 +32,7 @@
"license": "ISC",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "../scripts/template-oss/index.js"
},
"tap": {
Expand Down
4 changes: 2 additions & 2 deletions workspaces/arborist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"benchmark": "^2.1.4",
"chalk": "^4.1.0",
"minify-registry-metadata": "^3.0.0",
Expand Down Expand Up @@ -98,7 +98,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "../../scripts/template-oss/index.js"
}
}
4 changes: 2 additions & 2 deletions workspaces/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"tap": "^16.3.4"
},
"dependencies": {
Expand All @@ -50,6 +50,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3"
"version": "4.11.4"
}
}
4 changes: 2 additions & 2 deletions workspaces/libnpmaccess/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"nock": "^13.3.0",
"tap": "^16.3.4"
},
Expand All @@ -41,7 +41,7 @@
],
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "../../scripts/template-oss/index.js"
},
"tap": {
Expand Down
4 changes: 2 additions & 2 deletions workspaces/libnpmdiff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"tap": "^16.3.4"
},
"dependencies": {
Expand All @@ -58,7 +58,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "../../scripts/template-oss/index.js"
},
"tap": {
Expand Down
4 changes: 2 additions & 2 deletions workspaces/libnpmexec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.11.3",
"@npmcli/template-oss": "4.11.4",
"bin-links": "^4.0.1",
"just-extend": "^6.2.0",
"just-safe-set": "^4.2.1",
Expand All @@ -75,7 +75,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.3",
"version": "4.11.4",
"content": "../../scripts/template-oss/index.js"
}
}
Loading