update hw_report #518
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MSBuild | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: . | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Run git checkout | |
uses: actions/checkout@v4 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
run: | | |
msbuild /m /p:Configuration=Release /p:platform=x64 ${{env.SOLUTION_FILE_PATH}} | |
msbuild /m /p:Configuration=Release /p:platform=x86 ${{env.SOLUTION_FILE_PATH}} | |
- name: Copy files | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
md nwinfo | |
move x64\Release\nwinfo.exe nwinfo\nwinfox64.exe | |
move x64\Release\gnwinfo.exe nwinfo\gnwinfox64.exe | |
move Win32\Release\nwinfo.exe nwinfo\nwinfo.exe | |
move Win32\Release\gnwinfo.exe nwinfo\gnwinfo.exe | |
copy gnwinfo\gnwinfo.ini nwinfo\gnwinfo.ini | |
copy Win32\Release\ryzenadj.dll nwinfo\ryzenadj.dll | |
copy x64\Release\ryzenadjx64.dll nwinfo\ryzenadjx64.dll | |
powershell -ExecutionPolicy Bypass -File .\copy_res.ps1 -TargetFolder nwinfo | |
# - name: Create PDF | |
# uses: BaileyJM02/markdown-to-pdf@v1 | |
# with: | |
# input_path: README.md | |
# output_dir: nwinfo | |
# images_dir: doc | |
# build_html: false | |
# - name: Run UPX | |
# uses: crazy-max/ghaction-upx@v3 | |
# with: | |
# version: latest | |
# files: | | |
# .\nwinfo\nwinfox64.exe | |
# .\nwinfo\nwinfo.exe | |
# .\nwinfo\gnwinfox64.exe | |
# .\nwinfo\gnwinfo.exe | |
# .\nwinfo\libcdi.dll | |
# .\nwinfo\libcdix64.dll | |
# .\nwinfo\ryzenadj.dll | |
# .\nwinfo\ryzenadjx64.dll | |
# args: --best | |
- name: Create ZIP | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: 'nwinfo.zip' | |
directory: '.' | |
path: 'nwinfo' | |
- name: Delete old release | |
continue-on-error: true | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
gh release delete latest --cleanup-tag --yes | |
env: | |
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Release | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
gh release create latest nwinfo.zip -t "Development Build" -p | |
env: | |
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |