0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

Update snapshot-release.yml

This commit is contained in:
Fred K. Schott 2022-09-12 14:25:01 -07:00 committed by GitHub
parent c58d962dfa
commit 8031ef8039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,23 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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 <one-word-snapshot-name>"',
}) || exit 1);
return splitComment[1].trim();
result-encoding: string
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs.ref }}
@ -45,23 +62,6 @@ jobs:
- name: Build Packages - name: Build Packages
run: pnpm run build 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 <one-word-snapshot-name>"',
}) || exit 1);
return splitComment[1].trim();
result-encoding: string
- name: Get result - name: Get result
run: echo "${{steps.set-result.outputs.result}}" run: echo "${{steps.set-result.outputs.result}}"