Merge pull request #311 from distantcam/dependabot/nuget/verify-04071… #619
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| - "[0-9]+.[0-9]+.[0-9]+-**" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| name: 🧪 Run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| roslyn: ["3.11", "4.0", "4.4"] | |
| steps: | |
| - name: 🛒 Check-out code | |
| uses: actions/checkout@v4 | |
| - name: 📐 Setup .NET Core SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| global-json-file: src/global.json | |
| - name: 🔍 Enable problem matchers | |
| run: echo "::add-matcher::.github/matchers/dotnet.json" | |
| - name: 🛠️ Build code | |
| run: dotnet build --configuration Release | |
| - name: 🧪 Testing ${{ matrix.roslyn }} code | |
| run: > | |
| dotnet test | |
| --configuration Release | |
| -p:GeneratorVersion=${{ matrix.roslyn }} | |
| --logger GitHubActions | |
| -- | |
| RunConfiguration.CollectSourceInformation=true | |
| build: | |
| name: 🛠️ Build | |
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: 🛒 Check-out code | |
| uses: actions/checkout@v4 | |
| - name: 📐 Setup .NET Core SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| global-json-file: src/global.json | |
| - name: 🔍 Enable problem matchers | |
| run: echo "::add-matcher::.github/matchers/dotnet.json" | |
| - name: 🔧 Load packages | |
| run: dotnet restore | |
| - name: 🛠️ Build code | |
| run: dotnet build --configuration Release -p:Version=${{ github.ref_name }} -p:GitSha=${{ github.sha }} --no-restore | |
| - name: 📝 Generate Release Notes | |
| run: gh release create ${{ github.ref_name }} --draft --generate-notes nugets/*.nupkg | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |