From 8031ef8039ac698f78200400336ee0f08fd7e037 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Mon, 12 Sep 2022 14:25:01 -0700 Subject: [PATCH] Update snapshot-release.yml --- .github/workflows/snapshot-release.yml | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 0468b2d8fe..6f2cd130fb 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -26,6 +26,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Extract the snapshot name from comment body + id: getSnapshotName + uses: actions/github-script@v6 + env: + ISSUE_NUMBER: ${{ github.event.issue.number }} + with: + script: | + const splitComment = github.event.comment.body.split(' '); + splitComment.length !== 2 && (github.rest.issues.createComment({ + issue_number: process.env.ISSUE_NUMBER, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Invalid comment format. Expected: "!preview "', + }) || exit 1); + return splitComment[1].trim(); + result-encoding: string + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.ref }} @@ -45,23 +62,6 @@ jobs: - name: Build Packages run: pnpm run build - - name: Extract the snapshot name from comment body - id: getSnapshotName - uses: actions/github-script@v6 - env: - MESSAGE: ${{ steps.changesets.outputs.publish }} - with: - script: | - const splitComment = github.event.comment.body.split(' '); - splitComment.length !== 2 && (github.rest.issues.createComment({ - issue_number: process.env.ISSUE_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Invalid comment format. Expected: "!preview "', - }) || exit 1); - return splitComment[1].trim(); - result-encoding: string - - name: Get result run: echo "${{steps.set-result.outputs.result}}"