Skip to content

Commit

Permalink
refac: change import logger
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-braz committed Sep 11, 2023
1 parent 103595a commit 09fb854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions create_update_release/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require('child_process')

const core = require('@actions/core');
const github = require('@actions/github');
const {Logger} = require('../utils/logger.js');
const Logger = require('../utils/logger.js');

(async () => {

Expand Down Expand Up @@ -102,16 +102,14 @@ const {Logger} = require('../utils/logger.js');
if (release) {
releaseOptions.release_id = release.id; // Must be part of the parameters.

logger.log('Release Options (Update)', releaseOptions);
core.info(`Updating release for tag "${tag}".`);

const result = await api.repos.updateRelease(releaseOptions);
release = result.data;
isCreated = false;

} else {
logger.log('Release Options (Create)', releaseOptions);
core.info(`Creating release for tag ${tag}.`);
core.info(`Creating release for tag "${tag}".`);

const result = await api.repos.createRelease(releaseOptions);
release = result.data;
Expand Down
2 changes: 1 addition & 1 deletion delete_release/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require('child_process')

const core = require('@actions/core');
const github = require('@actions/github');
const {Logger} = require('../utils/logger.js');
const Logger = require('../utils/logger.js');

(async () => {

Expand Down

0 comments on commit 09fb854

Please sign in to comment.