Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
moiSentineL authored Aug 10, 2024
1 parent 352f69f commit d55fdab
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,18 @@ jobs:
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
$vcvarsall = Join-Path $vsPath "VC\Auxiliary\Build\vcvarsall.bat"
$compileCommand = "& '$vcvarsall' x64 && cl.exe /LD /Fe$($env:GITHUB_WORKSPACE)\${{ matrix.output }} $($env:GITHUB_WORKSPACE)\flomo\session_id.c"
cmd /c $compileCommand
$batchFile = New-TemporaryFile
$batchFile = Rename-Item -Path $batchFile -NewName "$($batchFile.BaseName).bat" -PassThru
$batchContent = @"
call "$vcvarsall" x64
cl.exe /LD /Fe$($env:GITHUB_WORKSPACE)\${{ matrix.output }} $($env:GITHUB_WORKSPACE)\flomo\session_id.c
"@
Set-Content -Path $batchFile -Value $batchContent
Start-Process -FilePath $batchFile -Wait -NoNewWindow
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit d55fdab

Please sign in to comment.