Skip to content

Commit 809528c

Browse files
committed
Update workflow
1 parent cd8c504 commit 809528c

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Diff for: .github/workflows/main.yml

+11-13
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,38 @@ jobs:
1717
# This workflow contains a single job called "build"
1818
build:
1919
# The type of runner that the job will run on
20-
runs-on: windows-2019
20+
runs-on: windows-2022
2121

2222
# Steps represent a sequence of tasks that will be executed as part of the job
2323
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodule: recursive
27+
fetch-depth: 0
28+
2429
- name: Check Commit and Install 7Zip PowerShell Module
2530
shell: powershell
26-
2731
run: |
28-
# cancel early, if not build commit
29-
$strVal="$Env:COMMIT_MESSAGE"
3032
# Convert commit message to a single line if multiline
31-
$singleLineStrVal = $strVal -replace "`r`n", " " -replace "`n", " "
33+
$singleLineStrVal = "$Env:COMMIT_MESSAGE" -replace "`r`n", " " -replace "`n", " "
3234
if($singleLineStrVal -match '#GITBUILD')
3335
{
34-
Write-Host 'True'
35-
} else {
36-
Write-Host 'False'
37-
exit(1)
36+
Write-Host 'Commit message matched with "#GITBUILD"'
3837
}
39-
Install-Module 7Zip4PowerShell -Force -Verbose
38+
Write-Host 'Installing 7Zip PowerShell module'
4039
env:
4140
COMMIT_MESSAGE: "${{ github.event.commits[0].message }}"
4241

43-
- uses: actions/checkout@v2
4442
- name: Restore NuGet packages
4543
run: nuget restore UnityLauncherPro.sln
4644

4745
- name: Build Binary
4846
shell: cmd
49-
run: call .\Build.cmd
47+
run: call ./Build.cmd
5048

5149
- name: Build Artifact
5250
shell: cmd
53-
run: call .\ArtifactBuild.cmd
51+
run: call ./ArtifactBuild.cmd
5452

5553
- name: Get current date and time
5654
id: datetime

0 commit comments

Comments
 (0)