Add CI workflows for tag-based release publishing and per-commit DLL builds #1
5
.github/workflows/build-on-commit.yml
vendored
5
.github/workflows/build-on-commit.yml
vendored
@@ -5,6 +5,9 @@ on:
|
||||
tags-ignore:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
@@ -23,7 +26,7 @@ jobs:
|
||||
run: nuget restore .\\PN532-Aime-Reader.sln
|
||||
|
||||
- name: Build NfcAime.Dll (x64, no project references)
|
||||
run: msbuild .\\src\\NfcAime.Dll\\NfcAime.Dll.csproj /p:Configuration=Release /p:Platform="Any CPU" /p:BuildProjectReferences=false
|
||||
run: msbuild .\\src\\NfcAime.Dll\\NfcAime.Dll.csproj /p:Configuration=Release /p:Platform="Any CPU" /p:PlatformTarget=x64 /p:BuildProjectReferences=false
|
||||
|
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
4
.github/workflows/release-on-tag.yml
vendored
4
.github/workflows/release-on-tag.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
run: nuget restore .\\PN532-Aime-Reader.sln
|
||||
|
||||
- name: Build NfcAime.Dll (x64, no project references)
|
||||
run: msbuild .\\src\\NfcAime.Dll\\NfcAime.Dll.csproj /p:Configuration=Release /p:Platform="Any CPU" /p:BuildProjectReferences=false
|
||||
run: msbuild .\\src\\NfcAime.Dll\\NfcAime.Dll.csproj /p:Configuration=Release /p:Platform="Any CPU" /p:PlatformTarget=x64 /p:BuildProjectReferences=false
|
||||
|
The MSBuild invocation passes This issue also appears on line 41 of the same file. The MSBuild invocation passes `/p:Platform="Any CPU"`, but `NfcAime.Dll.csproj` uses `AnyCPU` (no space) in its configuration conditions (e.g., `Release|AnyCPU`). With `Platform="Any CPU"`, the intended Release property group may not apply (Optimize/DefineConstants/OutputPath), and the built DLL may not match the expected settings. Prefer removing `/p:Platform` entirely (letting the project default to AnyCPU) or set `/p:Platform=AnyCPU`.
This issue also appears on line 41 of the same file.
|
||||
|
||||
- name: Generate commit notes since previous tag
|
||||
shell: pwsh
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
@"
|
||||
## Build Artifact
|
||||
- NfcAime.Dll.dll (x64, Release)
|
||||
- NfcAime.Dll.dll (Release, PlatformTarget=x64)
|
||||
|
||||
$commitTitle
|
||||
$commits
|
||||
|
||||
Reference in New Issue
Block a user
Same issue as the release workflow:
/p:Platform="Any CPU"likely won’t match the project’sRelease|AnyCPUcondition inNfcAime.Dll.csproj. This can lead to a non-Release configuration being effectively used and/or output landing somewhere other than the expectedbin/Releasepath. Remove/p:Platformor change it to/p:Platform=AnyCPU.