mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-05-14 04:20:33 +00:00
more fixes cjs->esm
This commit is contained in:
parent
9efd3dd5aa
commit
ca92529945
5 changed files with 17 additions and 5 deletions
2
index.js
2
index.js
|
|
@ -17,7 +17,7 @@ const run = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
require('./src/index')();
|
||||
import('./src/index.js')();
|
||||
};
|
||||
|
||||
run().catch(console.error);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ exports.handleBranchesOption = () => {
|
|||
core.debug(`branches input: ${branches}`);
|
||||
core.debug(`branch input: ${branch}`);
|
||||
|
||||
const semanticVersion = require('semantic-release/package.json').version;
|
||||
const semanticVersion = import('semantic-release/package.json').version;
|
||||
const semanticMajorVersion = Number(semanticVersion.replace(/\..+/g, ''));
|
||||
core.debug(`semanticMajorVersion: ${semanticMajorVersion}`);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
import exec from './_exec';
|
||||
import inputs from './inputs.json';
|
||||
import path, {dirname} from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
/**
|
||||
* Install Specifying Version semantic-release
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import path from 'path';
|
||||
import path, {dirname} from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as core from '@actions/core';
|
||||
import exec from './_exec';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
/**
|
||||
* Pre-install extra dependecies
|
||||
* @returns {Promise<void>}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import path from 'path';
|
||||
import path, {dirname} from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as core from '@actions/core';
|
||||
import outputs from './outputs.json';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
/**
|
||||
* setUpJob
|
||||
* @returns {Promise<void>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue