hd-app-scripts
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -23,2 +23,9 @@ #!/usr/bin/env node | ||
const runGithubAction = (platform, profile, repo, branch, artifact) => __awaiter(void 0, void 0, void 0, function* () { | ||
console.log('------------------------------------'); | ||
console.log('Run Github action'); | ||
console.log('GITHUB_BUILD_TOKEN', GITHUB_BUILD_TOKEN.split('').map(() => '*').join('')); | ||
console.log('GITHUB_BUILD_REPOSITORY_OWNER', GITHUB_BUILD_REPOSITORY_OWNER.split('').map(() => '*').join('')); | ||
console.log('GITHUB_BUILD_REPOSITORY_NAME', GITHUB_BUILD_REPOSITORY_NAME); | ||
console.log('GITHUB_BUILD_WORKFLOW_ID', GITHUB_BUILD_WORKFLOW_ID); | ||
console.log('GITHUB_BUILD_KEY', GITHUB_BUILD_KEY.split('').map(() => '*').join('')); | ||
const params = { | ||
@@ -32,3 +39,3 @@ os: platform === 'android' ? "ubuntu-latest" : "macos-13", | ||
}; | ||
console.log(params); | ||
console.log("Build with params: ", params); | ||
const response = yield axios_1.default.post(`https://api.github.com/repos/${GITHUB_BUILD_REPOSITORY_OWNER}/${GITHUB_BUILD_REPOSITORY_NAME}/actions/workflows/${GITHUB_BUILD_WORKFLOW_ID}/dispatches`, { | ||
@@ -42,3 +49,2 @@ ref: "main", | ||
}).catch((error) => { | ||
console.log(error.response.status, error.response.data); | ||
return error.response; | ||
@@ -50,6 +56,5 @@ }); | ||
else { | ||
console.log('Error running GitHub action'); | ||
console.log(response.data); | ||
console.error('Error running GitHub action: ', response.data); | ||
} | ||
}); | ||
exports.default = runGithubAction; |
{ | ||
"name": "hd-app-scripts", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5654
105