Skip to content

Commit

Permalink
update building cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace-Radom committed Oct 2, 2024
1 parent 0c920f9 commit c225a8c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master ]

env:
MSBuild_Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe

jobs:
build:

Expand All @@ -14,14 +17,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore
- name: Clean up
run: "${{env.MSBuild_Path}}" ${{github.workspace}}/LenovoLegionToolkit.sln -clean /p:Configuration=Release
- name: Build
run: .\make.bat
run: .\make.bat "${{env.MSBuild_Path}}"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "[0-9]*.[0-9]*.[0-9]*"

env:
MSBuild_Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe

jobs:
build:

Expand All @@ -13,14 +16,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore
- name: Clean up
run: "${{env.MSBuild_Path}}" ${{github.workspace}}/LenovoLegionToolkit.sln -clean /p:Configuration=Release
- name: Build
run: .\make.bat ${{ github.ref_name }}
run: .\make.bat "${{env.MSBuild_Path}}" ${{github.ref_name}}
- name: Release
uses: softprops/[email protected]
with:
Expand Down
14 changes: 8 additions & 6 deletions make.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@echo off

IF "%1"=="" (
IF "%~1"=="" (
SET COMPILER_PATH=msbuild
) ELSE (
SET COMPILER_PATH="%~1"
)
IF "%~2"=="" (
SET VERSION=0.0.1
) ELSE (
SET VERSION=%1
SET VERSION=%2
)


SET PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 6"

dotnet publish LenovoLegionToolkit.WPF -c release -o build /p:DebugType=None /p:FileVersion=%VERSION% /p:Version=%VERSION% || exit /b
dotnet publish LenovoLegionToolkit.SpectrumTester -c release -o build /p:DebugType=None /p:FileVersion=%VERSION% /p:Version=%VERSION% || exit /b
dotnet publish LenovoLegionToolkit.CLI -c release -o build /p:DebugType=None /p:FileVersion=%VERSION% /p:Version=%VERSION% || exit /b
%COMPILER_PATH% LenovoLegionToolkit.sln -restore /p:Configuration=Release /p:DebugType=None /p:OutDir=%~dp0build\ /p:FileVersion=%VERSION% /p:Version=%VERSION% || exit /b

iscc make_installer.iss /DMyAppVersion=%VERSION% || exit /b

0 comments on commit c225a8c

Please sign in to comment.