Merge pull request #289 from guitarrapc/dependabot/github_actions/act… #436
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: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| branches: | |
| - "main" | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: guitarrapc/actions/.github/actions/setup-dotnet@main | |
| with: | |
| restore-wasm-workload: true | |
| - name: Build | |
| run: dotnet build -c Release | |
| - name: Test | |
| run: dotnet test -c Release --logger GitHubActions --logger "console;verbosity=normal" | |
| run: | |
| needs: [build] | |
| strategy: | |
| matrix: | |
| include: | |
| - runs-on: ubuntu-24.04 | |
| ext: "" | |
| - runs-on: windows-2025 | |
| ext: .exe | |
| - runs-on: macos-15 | |
| ext: "" | |
| permissions: | |
| contents: read | |
| runs-on: ${{ matrix.runs-on }} | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: guitarrapc/actions/.github/actions/setup-dotnet@main | |
| with: | |
| dotnet-version: 10.0.x | |
| # ConsoleApp | |
| - name: Run ConsoleApp | |
| run: dotnet run --c Release | |
| working-directory: ./samples/ConsoleApp | |
| # SimpleGenerate | |
| - name: Run SimpleGenerate | |
| run: dotnet run -c Release | |
| working-directory: ./samples/SimpleGenerate | |
| # NativeAOT | |
| - name: Run ConsoleAppNativeAOT | |
| shell: bash | |
| run: | | |
| dotnet publish ./samples/ConsoleAppNativeAOT/ConsoleAppNativeAOT.csproj -c Release -o ./publish/ | |
| cd ./publish/ | |
| ls -l | |
| chmod +x ConsoleAppNativeAOT${{ matrix.ext }} | |
| ./ConsoleAppNativeAOT${{ matrix.ext }} |