Force -p:Platform=x64 in workflow dotnet build steps
Project-level dotnet build defaults to AnyCPU and emits to Craftimizer/bin/Release/, even though the csproj declares <Platforms>x64</Platforms> and <RuntimeIdentifier>win-x64</RuntimeIdentifier>. That mismatch silently broke the first v0.1.0 release run (/JonKazama-Hellion/Craftimizer/actions/runs/387): build succeeded but 'find Craftimizer/bin/x64/Release -name latest.zip' returned 'No such file or directory' so the release-action got nothing to attach. Local builds via 'dotnet build Craftimizer.sln' work because solution- level builds inherit the per-project Platforms list as the default, which is a different code path from project-level builds. Add -p:Platform=x64 to both build.yml and release.yml dotnet steps so the CI build agrees with the find paths in the same workflow. After this push, the v0.1.0 release can be re-triggered via Gitea's workflow_dispatch on the tag (Actions UI -> Release -> Run workflow, pick v0.1.0 from the Ref dropdown). The tag itself stays unchanged.
This commit is contained in:
@@ -44,7 +44,11 @@ jobs:
|
||||
unzip -oq dalamud.zip -d "$hooks"
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore Craftimizer/Craftimizer.csproj
|
||||
run: dotnet restore Craftimizer/Craftimizer.csproj -p:Platform=x64
|
||||
|
||||
- name: Build (Release)
|
||||
run: dotnet build Craftimizer/Craftimizer.csproj --configuration Release --no-restore
|
||||
# -p:Platform=x64 is required: csproj declares <Platforms>x64</Platforms>
|
||||
# and <RuntimeIdentifier>win-x64</RuntimeIdentifier>, but project-level
|
||||
# dotnet build defaults to AnyCPU and emits to bin/Release/ instead of
|
||||
# bin/x64/Release/. The release workflow's find step expects the latter.
|
||||
run: dotnet build Craftimizer/Craftimizer.csproj --configuration Release --no-restore -p:Platform=x64
|
||||
|
||||
Reference in New Issue
Block a user