Try with writefilesync

This commit is contained in:
Tom Hu 2021-07-06 17:13:26 -07:00
parent 409204d0d0
commit 8fdf22d1e8
No known key found for this signature in database
GPG key ID: F7E832BD316D5603
3 changed files with 14 additions and 3 deletions

View file

@ -100,4 +100,4 @@ branding:
icon: 'umbrella'
runs:
using: 'node12'
main: 'dist/index.js'
main: 'src/index.js'

6
dist/index.js vendored
View file

@ -14501,11 +14501,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
}
};
var _this = this;
var fs = __nccwpck_require__(5747);
var core = __nccwpck_require__(2186);
var exec = __nccwpck_require__(1514);
var superagent = __nccwpck_require__(1524);
// import buildExec from './buildExec';
// const {failCi} = buildExec();
console.log('oh hi');
var uploader = (function () { return __awaiter(_this, void 0, void 0, function () {
var err_1;
return __generator(this, function (_a) {
@ -14522,7 +14524,9 @@ var uploader = (function () { return __awaiter(_this, void 0, void 0, function (
}
});
}); })();
exec.exec(uploader);
fs.writeFileSync('uploader', uploader);
console.log('Did it');
exec.exec('uploader');
/***/ }),

View file

@ -1,3 +1,5 @@
const fs = require('fs');
const core = require('@actions/core');
const exec = require('@actions/exec');
@ -7,6 +9,7 @@ const superagent = require('superagent');
// const {failCi} = buildExec();
console.log('oh hi');
const uploader = (async () => {
try {
return await superagent.get('https://uploader.codecov.io/latest/codecov-linux');
@ -17,4 +20,8 @@ const uploader = (async () => {
}
})();
exec.exec(uploader);
fs.writeFileSync('uploader', uploader);
console.log('Did it');
exec.exec('uploader');