Skip to content

Commit

Permalink
ci: update comment-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouslag committed Apr 30, 2024
1 parent c7f76ec commit 0e6cd78
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/comment-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
with:
fetch-depth: 0

- name: ⬇️ Checkout PR
run: |
git fetch origin pull/${{ github.event.issue.number }}/head:pr-find-commit
git checkout pr-find-commit
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
Expand Down Expand Up @@ -50,13 +55,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,
});

0 comments on commit 0e6cd78

Please sign in to comment.