@@ -18,10 +18,14 @@ import {getWorkDirName, addNoJekyll, addCNAME, skipOnFork} from './utils';
18
18
export async function run ( ) : Promise < void > {
19
19
try {
20
20
const inps : Inputs = getInputs ( ) ;
21
+ core . startGroup ( 'Dump inputs' ) ;
21
22
showInputs ( inps ) ;
23
+ core . endGroup ( ) ;
22
24
23
25
if ( core . isDebug ( ) ) {
26
+ core . startGroup ( 'Debug: dump context' ) ;
24
27
console . log ( context ) ;
28
+ core . endGroup ( ) ;
25
29
}
26
30
27
31
const eventName = context . eventName ;
@@ -43,17 +47,21 @@ export async function run(): Promise<void> {
43
47
}
44
48
}
45
49
50
+ core . startGroup ( 'Setup auth token' ) ;
46
51
const remoteURL = await setTokens ( inps ) ;
47
52
core . debug ( `remoteURL: ${ remoteURL } ` ) ;
53
+ core . endGroup ( ) ;
48
54
55
+ core . startGroup ( 'Prepare publishing assets' ) ;
49
56
const date = new Date ( ) ;
50
57
const unixTime = date . getTime ( ) ;
51
58
const workDir = await getWorkDirName ( `${ unixTime } ` ) ;
52
59
await setRepo ( inps , remoteURL , workDir ) ;
53
-
54
60
await addNoJekyll ( workDir , inps . DisableNoJekyll , inps . PublishBranch ) ;
55
61
await addCNAME ( workDir , inps . CNAME ) ;
62
+ core . endGroup ( ) ;
56
63
64
+ core . startGroup ( 'Setup Git config' ) ;
57
65
try {
58
66
await exec . exec ( 'git' , [ 'remote' , 'rm' , 'origin' ] ) ;
59
67
} catch ( e ) {
@@ -62,6 +70,9 @@ export async function run(): Promise<void> {
62
70
await exec . exec ( 'git' , [ 'remote' , 'add' , 'origin' , remoteURL ] ) ;
63
71
await exec . exec ( 'git' , [ 'add' , '--all' ] ) ;
64
72
await setCommitAuthor ( inps . UserName , inps . UserEmail ) ;
73
+ core . endGroup ( ) ;
74
+
75
+ core . startGroup ( 'Create a commit' ) ;
65
76
const hash = `${ process . env . GITHUB_SHA } ` ;
66
77
const baseRepo = `${ github . context . repo . owner } /${ github . context . repo . repo } ` ;
67
78
const commitMessage = getCommitMessage (
@@ -72,8 +83,12 @@ export async function run(): Promise<void> {
72
83
hash
73
84
) ;
74
85
await commit ( inps . AllowEmptyCommit , commitMessage ) ;
86
+ core . endGroup ( ) ;
87
+
88
+ core . startGroup ( 'Push the commit or tag' ) ;
75
89
await push ( inps . PublishBranch , inps . ForceOrphan ) ;
76
90
await pushTag ( inps . TagName , inps . TagMessage ) ;
91
+ core . endGroup ( ) ;
77
92
78
93
core . info ( '[INFO] Action successfully completed' ) ;
79
94
0 commit comments