Skip to content

Commit 704d1bd

Browse files
committed
ci: fix undefined sha in canary releases
1 parent ea82c8c commit 704d1bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/canary.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ jobs:
4949
5050
const packageJSONPath = './npmDist/package.json';
5151
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8'));
52-
const { sha, pull_request } = JSON.parse(fs.readFileSync('./event.json', 'utf-8'));
52+
const { pull_request } = JSON.parse(fs.readFileSync('./event.json', 'utf-8'));
5353
5454
// Override entire 'publishConfig' since it can contain untrusted data.
5555
packageJSON.publishConfig = { tag: `canary-pr-${pull_request.number}` };
5656
5757
assert(!packageJSON.version.includes('+'), 'Can not append after metadata');
5858
packageJSON.version += packageJSON.version.includes('-') ? '.' : '-';
59-
packageJSON.version += `canary.pr.${pull_request.number}.${sha}`;
59+
packageJSON.version += `canary.pr.${pull_request.number}.${pull_request.head.sha}`;
6060
6161
assert(
6262
packageJSON.scripts == null,

0 commit comments

Comments
 (0)