Fix bug #229
Workflow file for this run
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: Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '.scripts/**' | |
| - .gitignore | |
| - CODE_OF_CONDUCT.md | |
| - LICENSE | |
| - README.md | |
| workflow_call: | |
| inputs: | |
| build-artifacts: | |
| type: boolean | |
| required: true | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout code | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| #if (!UseApiOnly) | |
| - name: Install Node & cache npm packages | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| cache-dependency-path: src/Web/ClientApp/package-lock.json | |
| #endif | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v4 | |
| - name: Restore solution | |
| run: dotnet restore | |
| - name: Build solution | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test solution | |
| run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests" | |
| - name: Publish website | |
| if: ${{ inputs.build-artifacts == true }} | |
| run: | | |
| dotnet publish --configuration Release --runtime win-x86 --self-contained --output ./publish | |
| cd publish | |
| zip -r ./publish.zip . | |
| working-directory: ./src/Web/ | |
| - name: Upload website artifact (website) | |
| if: ${{ inputs.build-artifacts == true }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: website | |
| path: ./src/Web/publish/publish.zip | |
| if-no-files-found: error | |