mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-05-14 12:30:32 +00:00
24 lines
572 B
JavaScript
24 lines
572 B
JavaScript
import exec from './src/_exec.js';
|
|
import path, {dirname} from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const run = async () => {
|
|
// Install Dependencies
|
|
{
|
|
const {stdout, stderr} = await exec('npm --loglevel error ci --only=prod', {
|
|
cwd: path.resolve(__dirname)
|
|
});
|
|
console.log(stdout);
|
|
if (stderr) {
|
|
return Promise.reject(stderr);
|
|
}
|
|
}
|
|
|
|
const mod = await import('./src/index.js');
|
|
await mod.default();
|
|
};
|
|
|
|
run().catch(console.error);
|