Skip to content

Commit d82b34e

Browse files
authored
ci: update comment-release workflow (#99)
1 parent 4c017ff commit d82b34e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/comment-release.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20+
- name: ⬇️ Checkout PR
21+
run: |
22+
git fetch origin pull/${{ github.event.issue.number }}/head:pr-find-commit
23+
git checkout pr-find-commit
24+
2025
- name: Install pnpm
2126
uses: pnpm/action-setup@v3
2227
with:
@@ -50,13 +55,15 @@ jobs:
5055
const { issue: { number: issue_number }, repo: { owner, repo }, payload } = context;
5156
const { name: packageName, version } = require(`${process.env.GITHUB_WORKSPACE}/package.json`);
5257
58+
const body = [
59+
`npm package published to pre tag.`,
60+
`\`\`\`bash\nnpm install ${packageName}@pre\n\`\`\``
61+
`\`\`\`bash\nnpm install ${packageName}@${version}\n\`\`\``
62+
].join('\n\n');
63+
5364
await github.rest.issues.updateComment({
5465
owner,
5566
repo,
5667
comment_id: payload.comment.id,
57-
body: [
58-
`npm package published to pre tag.`,
59-
`\`\`\`bash\nnpm install ${packageName}@pre\n\`\`\``
60-
`\`\`\`bash\nnpm install ${packageName}@${version}\n\`\`\``
61-
].join('\n\n'),
68+
body,
6269
});

0 commit comments

Comments
 (0)