Skip to content

Commit d46b243

Browse files
committed
Use github action core method to do logging
1 parent e7b177f commit d46b243

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/helpers/git.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { exec } from '@actions/exec';
2+
import * as core from '@actions/core';
23
import { getExecOutput } from './github';
34

45
async function ensureRemoteExists(name: string, target: string): Promise<void> {
@@ -29,7 +30,8 @@ async function publishSubSplit(binary: string, target: string, branch: string, n
2930

3031
async function commitHashHasTag(hash: string, clonePath: string) {
3132
let output = await getExecOutput('git', ['tag', '--points-at', hash], { cwd: clonePath });
32-
console.log(hash, 'points-at', output);
33+
34+
core.info(`${hash} points-at ${output}`);
3335

3436
return output !== '';
3537
}

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function downloadSplitsh(): Promise<void> {
2424
let downloadPath = `${downloadDir}split-lite.tar.gz`;
2525
let platform = process.platform === 'darwin' ? 'lite_darwin_amd64' : 'lite_linux_amd64';
2626

27-
console.log(`Downloading splitsh for "${platform}"`);
27+
core.debug(`Downloading splitsh for "${platform}"`);
2828

2929
let url = `https://github.com/splitsh/lite/releases/download/v1.0.1/${platform}.tar.gz`;
3030

@@ -62,7 +62,7 @@ async function downloadSplitsh(): Promise<void> {
6262
let tag = event.ref;
6363

6464
if (event.ref_type !== 'tag') {
65-
console.log('No tag was created, skipping...');
65+
core.info('No tag was created, skipping...');
6666

6767
return;
6868
}
@@ -85,7 +85,7 @@ async function downloadSplitsh(): Promise<void> {
8585
let tag = event.ref;
8686

8787
if (event.ref_type !== 'tag') {
88-
console.log('No tag was deleted, skipping...');
88+
core.info('No tag was deleted, skipping...');
8989

9090
return;
9191
}

0 commit comments

Comments
 (0)