Skip to content

update the version check file #191

update the version check file

update the version check file #191

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- "*.md"
pull_request:
paths-ignore:
- "*.md"
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- platform: Win32
dir: Release
- platform: x64
dir: Release64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: recursive
- 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 ${{matrix.platform}}
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
sed -i "s/no date/$($env:GITHUB_SHA.Substring(0,7))/gm" ./src/last/version.h
msbuild -m -p:Configuration=${{env.BUILD_CONFIGURATION}} -p:Platform=${{matrix.platform}} -warnAsError ${{env.SOLUTION_FILE_PATH}}
- name: Upload artifacts for ${{matrix.platform}}
uses: actions/upload-artifact@v4
with:
name: grepWin-${{matrix.platform}}
path: bin/${{matrix.dir}}/grepWin.exe