File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,18 @@ if (exitCode) {
7070 ? core . getBooleanInput ( "push-force" )
7171 : null ;
7272 if ( ! pushRefspec ) {
73- const { stdout } = await $ ( {
73+ const { exitCode } = await $ ( {
7474 cwd : rootPath ,
75- } ) `git rev-parse --abbrev-ref HEAD` ;
76- if ( stdout === "HEAD" ) {
75+ reject : false
76+ } ) `git symbolic-ref HEAD` ;
77+ if ( exitCode ) {
78+ pushRefspec = stdout ;
79+ } else {
7780 const { stdout } = await $ ( { cwd : rootPath } ) `git tag --points-at HEAD` ;
7881 const tags = stdout . split ( / \r ? \n / g) ;
7982 console . assert ( tags . length === 1 , `tags=${ tags } longer than 1` ) ;
8083 pushRefspec = tags [ 0 ] ;
8184 console . assert ( pushForce , "push-force: false never updates tag" ) ;
82- } else {
83- pushRefspec = stdout ;
8485 }
8586 }
8687 if ( pushForce == null ) {
You can’t perform that action at this time.
0 commit comments