ci:Github Actions 自动构建

This commit is contained in:
2026-05-19 02:22:36 +08:00
parent c524204441
commit c6750d63c2
2 changed files with 35 additions and 0 deletions

34
.github/workflows/build-on-commit.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Build NfcAime.Dll on Commit
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
run: msbuild .\PN532-Aime-Reader.sln /t:Restore /p:Configuration=Release
- name: Build NfcAime (Release)
run: msbuild .\PN532-Aime-Reader\PN532-Aime-Reader.sln /p:Configuration=Release
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: NfcAime.Dll-${{ github.sha }}
path: src/NfcAime.Dll/bin/Release/NfcAime.Dll.dll
if-no-files-found: error

View File

@@ -11,6 +11,7 @@
<RootNamespace>NfcAime.Dll</RootNamespace>
<AssemblyName>NfcAime.Dll</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<DllExportTargetFrameworkVersion>v4.5</DllExportTargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>13</LangVersion>