From 007a8e12b84f9e2407af44e5026ee36504795955 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 18 Oct 2024 11:13:11 +0100 Subject: [PATCH] [LOCAL] Fix template publishing (#47116) --- .github/workflow-scripts/__tests__/publishTemplate-test.js | 4 ++-- .github/workflow-scripts/publishTemplate.js | 2 +- .github/workflow-scripts/utils.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflow-scripts/__tests__/publishTemplate-test.js b/.github/workflow-scripts/__tests__/publishTemplate-test.js index c917dad568debe..a956b922b7e113 100644 --- a/.github/workflow-scripts/__tests__/publishTemplate-test.js +++ b/.github/workflow-scripts/__tests__/publishTemplate-test.js @@ -46,7 +46,7 @@ describe('#publishTemplate', () => { expect(github.rest.actions.createWorkflowDispatch).toHaveBeenCalledWith({ owner: 'react-native-community', repo: 'template', - workflow_id: 'release.yml', + workflow_id: 'release.yaml', ref: '0.76-stable', inputs: { dry_run: true, @@ -66,7 +66,7 @@ describe('#publishTemplate', () => { expect(github.rest.actions.createWorkflowDispatch).toHaveBeenCalledWith({ owner: 'react-native-community', repo: 'template', - workflow_id: 'release.yml', + workflow_id: 'release.yaml', ref: '0.76-stable', inputs: { dry_run: false, diff --git a/.github/workflow-scripts/publishTemplate.js b/.github/workflow-scripts/publishTemplate.js index 12221c1ae756b4..b0c8946b6793df 100644 --- a/.github/workflow-scripts/publishTemplate.js +++ b/.github/workflow-scripts/publishTemplate.js @@ -42,7 +42,7 @@ module.exports.publishTemplate = async (github, version, dryRun = true) => { await github.rest.actions.createWorkflowDispatch({ owner: 'react-native-community', repo: 'template', - workflow_id: 'release.yml', + workflow_id: 'release.yaml', ref, inputs: { dry_run: dryRun, diff --git a/.github/workflow-scripts/utils.js b/.github/workflow-scripts/utils.js index 1c2b8a5d1f8dbd..ddbe2b210b8967 100644 --- a/.github/workflow-scripts/utils.js +++ b/.github/workflow-scripts/utils.js @@ -9,7 +9,7 @@ const {execSync} = require('child_process'); -function run(...cmd) { +function run(cmd) { return execSync(cmd, 'utf8').toString().trim(); } module.exports.run = run;