Skip to content

update action

update action #14

Workflow file for this run

name: MSBuild
on:
push:
tags:
- '*'
env:
SOLUTION_FILE_PATH: .
BUILD_CONFIGURATION: fne_release
BUILD_PLATFORM: x86
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Set System Locale to Chinese
run: |
$languageList = New-Object System.Collections.Generic.List[Microsoft.InternationalSettings.Commands.WinUserLanguage]
$languageList.Add((New-Object Microsoft.InternationalSettings.Commands.WinUserLanguage -ArgumentList "zh-CN"))
Set-WinUserLanguageList $languageList -Force
# 设置系统代码页为简体中文
Set-WinSystemLocale zh-CN
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
msbuild ${{env.SOLUTION_FILE_PATH}}/AutoLinker.vcxproj -t:rebuild -verbosity:diag -property:Configuration=${{env.BUILD_CONFIGURATION}} -property:Platform=${{env.BUILD_PLATFORM}}
- name: Compress-Archive
run: |
powershell Compress-Archive -Path "bin/${{env.BUILD_CONFIGURATION}}/AutoLinker.fne" -DestinationPath AutoLinker-${{github.ref_name}}.zip
- name: Create a Release
uses: ncipollo/release-action@v1
with:
artifacts: "AutoLinker-${{github.ref_name}}.zip"
token: ${{ secrets.GITHUB_TOKEN }}