mirror of
https://github.com/yanhao98/semantic-release-action.git
synced 2025-07-12 23:30:48 +08:00
feat: dynamically import '@actions/core' in runRelease function
This commit is contained in:
@ -2,7 +2,6 @@ import { exec as execCallback } from 'node:child_process';
|
|||||||
import { dirname, resolve } from 'node:path';
|
import { dirname, resolve } from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { promisify } from 'node:util';
|
import { promisify } from 'node:util';
|
||||||
import core from '@actions/core';
|
|
||||||
const exec = promisify(execCallback);
|
const exec = promisify(execCallback);
|
||||||
const self_cwd = dirname(fileURLToPath(import.meta.url));
|
const self_cwd = dirname(fileURLToPath(import.meta.url));
|
||||||
// import packageJson from './package.json' with { type: "json" };
|
// import packageJson from './package.json' with { type: "json" };
|
||||||
@ -21,6 +20,7 @@ async function installDependencies() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function runRelease() {
|
async function runRelease() {
|
||||||
|
const core = await import('@actions/core');
|
||||||
const semanticRelease = await import('semantic-release');
|
const semanticRelease = await import('semantic-release');
|
||||||
const result = await semanticRelease.default(
|
const result = await semanticRelease.default(
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user