70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
22 lines
785 B
JavaScript
22 lines
785 B
JavaScript
// This file is not used directly.
|
|
// Instead its contents are used in `.github/workflows/write-prerelease-comment.yml`
|
|
// Any changes here should be copied into the CI step there.
|
|
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
run_id: context.payload.workflow_run.id,
|
|
});
|
|
|
|
for (const artifact of allArtifacts.data.artifacts) {
|
|
// Extract the PR number from the artifact name
|
|
const match = /^npm-package-(.+)-(\d+)$/.exec(artifact.name);
|
|
if (match) {
|
|
const packageName = match[1].toUpperCase();
|
|
require("fs").appendFileSync(
|
|
process.env.GITHUB_ENV,
|
|
`\nWORKFLOW_RUN_PR_FOR_${packageName}=${match[2]}` +
|
|
`\nWORKFLOW_RUN_ID_FOR_${packageName}=${context.payload.workflow_run.id}`
|
|
);
|
|
}
|
|
}
|