Deploy: install wasm-tools workload before publish (match CI) #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install WASM workload | |
| run: dotnet workload install wasm-tools | |
| - name: Restore | |
| run: dotnet restore src/HealthNerd.Wasm/HealthNerd.Wasm.csproj | |
| - name: Build | |
| run: dotnet build src/HealthNerd.Wasm/HealthNerd.Wasm.csproj -c Release --no-restore | |
| - name: Publish (dry-run to verify WASM output) | |
| run: dotnet publish src/HealthNerd.Wasm/HealthNerd.Wasm.csproj -c Release --no-restore -o ./publish | |
| - name: Verify output exists | |
| run: | | |
| ls -la publish/wwwroot/ | |
| test -f publish/wwwroot/index.html | |
| test -f publish/wwwroot/_framework/blazor.webassembly.js |