Browse Source

build: account for path-filtering workflow in release-build script (#32063)

* build: account for path-filtering workflow in release-build script

* build: update syntax for workflow id

Co-authored-by: John Kleinschmidt <[email protected]>

Co-authored-by: John Kleinschmidt <[email protected]>
Keeley Hammond 3 years ago
parent
commit
83a4b234d7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      script/release/ci-release-build.js

+ 3 - 2
script/release/ci-release-build.js

@@ -110,8 +110,9 @@ async function getCircleCIWorkflowId (pipelineId) {
     switch (pipelineInfo.state) {
       case 'created': {
         const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET');
-        if (workflows.items.length === 1) {
-          workflowId = workflows.items[0].id;
+        // The logic below expects two workflow.items: publish [0] & setup [1]
+        if (workflows.items.length === 2) {
+          workflowId = workflows.items.find(item => item.name.includes('publish')).id;
           break;
         }
         console.log('Unxpected number of workflows, response was:', pipelineInfo);