Skip to content

Commit

Permalink
Update msbuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai authored Apr 23, 2024
1 parent 6854978 commit 90b5b08
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ on:
- '*'

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-2022

steps:
- uses: actions/checkout@v2

Expand All @@ -28,17 +23,22 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Build
- name: Build x86
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}}

- name: Compress-Archive x86
run: powershell Compress-Archive -Path "Release/version.dll" -DestinationPath "x86.zip"

- name: Build x64
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=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Compress-Archive
run: powershell Compress-Archive -Path "Release/version.dll" -DestinationPath "Release.zip"
- name: Compress-Archive x64
run: powershell Compress-Archive -Path "x64/Release/version.dll" -DestinationPath "x64.zip"

- name: Create a Release
uses: ncipollo/release-action@v1
with:
artifacts: "Release.zip"
artifacts: "x86.zip, x64.zip"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 90b5b08

Please sign in to comment.