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 x64 # and win-x64, 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