Files
JonKazama-Hellion 960114c142
Security / scan (push) Successful in 17s
Build / Build (Release) (push) Successful in 26s
Release / Build and attach release ZIP (push) Successful in 34s
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.
2026-05-26 20:54:26 +02:00

55 lines
1.9 KiB
YAML

name: Build
# Verifies that every push to main and every PR still builds against the
# current Dalamud staging branch. Does not produce release artefacts; the
# release workflow handles that on tag.
#
# Linux runner: gitea.com Cloud Actions provides ubuntu-latest. The plugin
# csproj targets net10.0-windows, but `dotnet build` cross-compiles on Linux
# as long as the Dalamud staging assemblies are present at the expected
# lookup path ($(HOME)/.xlcore/dalamud/Hooks/dev/, which Dalamud SDK 15 uses
# on Linux).
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Minimum permissions for a build-only workflow: read the repo, nothing else.
permissions:
contents: read
jobs:
build:
name: Build (Release)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup .NET 10
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- name: Download Dalamud staging
run: |
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
mkdir -p "$hooks"
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
unzip -oq dalamud.zip -d "$hooks"
- name: Restore
run: dotnet restore Craftimizer/Craftimizer.csproj -p:Platform=x64
- name: Build (Release)
# -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