From 0ed0283a74e2740d684a972ecc7dd01f1ad8e5a0 Mon Sep 17 00:00:00 2001 From: Landon Gavin Date: Mon, 29 Apr 2024 22:22:36 -0400 Subject: [PATCH] ci: update comment-release workflow --- .github/workflows/comment-release.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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, });