mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-04-07 16:09:24 +00:00
feat: update node version on runner to 20
BREAKING CHANGE: set the default node version to 20
This commit is contained in:
parent
7f0c0e4904
commit
0c2055456e
8 changed files with 4653 additions and 2589 deletions
|
|
@ -47,6 +47,7 @@ exports.handleBranchesOption = () => {
|
|||
*/
|
||||
exports.handleDryRunOption = () => {
|
||||
const dryRun = core.getInput(inputs.dry_run);
|
||||
core.debug(`dryRun input: ${dryRun}`);
|
||||
|
||||
switch (dryRun) {
|
||||
case 'true':
|
||||
|
|
@ -66,6 +67,7 @@ exports.handleDryRunOption = () => {
|
|||
*/
|
||||
exports.handleCiOption = () => {
|
||||
const ci = core.getInput(inputs.ci);
|
||||
core.debug(`ci input: ${ci}`);
|
||||
|
||||
switch (ci) {
|
||||
case 'true':
|
||||
|
|
@ -85,6 +87,7 @@ exports.handleCiOption = () => {
|
|||
*/
|
||||
exports.handleExtends = () => {
|
||||
const extend = core.getInput(inputs.extends);
|
||||
core.debug(`extend input: ${extend}`);
|
||||
|
||||
if (extend) {
|
||||
const extendModuleNames = extend.split(/\r?\n/)
|
||||
|
|
@ -103,6 +106,7 @@ exports.handleExtends = () => {
|
|||
*/
|
||||
exports.handleTagFormat = () => {
|
||||
const tagFormat = core.getInput(inputs.tag_format);
|
||||
core.debug(`citagFormat input: ${tagFormat}`);
|
||||
|
||||
if (tagFormat) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ const release = async () => {
|
|||
await preInstall(core.getInput(inputs.extra_plugins));
|
||||
await preInstall(core.getInput(inputs.extends));
|
||||
|
||||
const semanticRelease = require('semantic-release');
|
||||
const result = await semanticRelease({
|
||||
const semanticRelease = await import('semantic-release');
|
||||
const result = await semanticRelease.default({
|
||||
...handleBranchesOption(),
|
||||
...handleDryRunOption(),
|
||||
...handleCiOption(),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ module.exports = async (result) => {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const {lastRelease, commits, nextRelease, releases} = result;
|
||||
const {lastRelease, commits, nextRelease, releases} = await result;
|
||||
|
||||
if (lastRelease.version) {
|
||||
core.debug(`The last release was "${lastRelease.version}".`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue