diff --git a/.github/workflows/comment-release.yml b/.github/workflows/comment-release.yml index 00b8ef9..d137aa7 100644 --- a/.github/workflows/comment-release.yml +++ b/.github/workflows/comment-release.yml @@ -50,13 +50,15 @@ jobs: const { issue: { number: issue_number }, repo: { owner, repo }, payload } = context; const { name: packageName, version } = require(`${process.env.GITHUB_WORKSPACE}/package.json`); + const body = [ + `npm package published to pre tag.`, + `\`\`\`bash\nnpm install ${packageName}@pre\n\`\`\`` + `\`\`\`bash\nnpm install ${packageName}@${version}\n\`\`\`` + ].join('\n\n'); + await github.rest.issues.updateComment({ owner, repo, comment_id: payload.comment.id, - body: [ - `npm package published to pre tag.`, - `\`\`\`bash\nnpm install ${packageName}@pre\n\`\`\`` - `\`\`\`bash\nnpm install ${packageName}@${version}\n\`\`\`` - ].join('\n\n'), + body, });