Skip to content

Commit cd8c504

Browse files
committed
Use environment variable to store commit message to support single quotes
1 parent 934ec4e commit cd8c504

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: .github/workflows/main.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
run: |
2828
# cancel early, if not build commit
29-
$strVal ='${{ github.event.commits[0].message }}'
29+
$strVal="$Env:COMMIT_MESSAGE"
3030
# Convert commit message to a single line if multiline
3131
$singleLineStrVal = $strVal -replace "`r`n", " " -replace "`n", " "
3232
if($singleLineStrVal -match '#GITBUILD')
@@ -37,6 +37,9 @@ jobs:
3737
exit(1)
3838
}
3939
Install-Module 7Zip4PowerShell -Force -Verbose
40+
env:
41+
COMMIT_MESSAGE: "${{ github.event.commits[0].message }}"
42+
4043
- uses: actions/checkout@v2
4144
- name: Restore NuGet packages
4245
run: nuget restore UnityLauncherPro.sln

0 commit comments

Comments
 (0)