Skip to content

Commit

Permalink
Update main.yml (to handle multiline commit messages) #GITBUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
unitycoder committed Apr 20, 2024
1 parent b27607f commit c52e739
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -25,7 +25,9 @@ jobs:
run: |
# cancel early, if not build commit
$strVal ='${{ github.event.commits[0].message }}'
if($strVal -clike '*#GITBUILD*')
# Convert commit message to a single line if multiline
$singleLineStrVal = $strVal -replace "`r`n", " " -replace "`n", " "
if($singleLineStrVal -match '#GITBUILD')
{
Write-Host 'True'
} else {
Expand Down

0 comments on commit c52e739

Please sign in to comment.