Merge pull request #165 from ionide/dependabot/github_actions/actions… #390
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: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 | |
| DOTNET_ROLL_FORWARD: LatestMajor | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| security-events: write | |
| jobs: | |
| ci: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: 'global.json' | |
| dotnet-version: | | |
| 8.x | |
| 9.x | |
| 10.x | |
| - name: Build | |
| run: dotnet fsi build.fsx | |
| - name: Analyzers | |
| continue-on-error: true | |
| run: dotnet fsharp-analyzers --project ./src/Ionide.Analyzers/Ionide.Analyzers.fsproj --project ./tests/Ionide.Analyzers.Tests/Ionide.Analyzers.Tests.fsproj --analyzers-path ./src/Ionide.Analyzers/bin/Release/net8.0 --report ./report.sarif | |
| if: matrix.os == 'ubuntu-latest' | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| sarif_file: ./report.sarif | |
| - name: Upload documentation | |
| if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./output | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: ci | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |