12
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2026-05-14 12:30:32 +00:00
semantic-release-action/index.js
Leif Ødegård Uhlen b71c53a4f8 more fixes cjs->esm
2026-05-05 11:07:57 +02:00

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);