Skip to content

ProjectHasChanged Check #923

ProjectHasChanged Check

ProjectHasChanged Check #923

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET (Windows)
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
SOLUTIONS: ("ModularPipelines.sln", "ModularPipelines.Examples.sln", "src/ModularPipelines.Azure/ModularPipelines.Azure.sln", "src/ModularPipelines.AmazonWebServices/ModularPipelines.AmazonWebServices.sln")
DOTNET_VERSIONS: ("net6.0", "net7.0")
jobs:
pipeline-windows:
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Pull Requests' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup WSL
uses: Vampire/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Cache NuGet
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build ModularPipelines.Analyzers.sln
run: dotnet build ModularPipelines.Analyzers.sln -c Release
- name: Build
run: |
foreach ($SOLUTION in ${{ env.SOLUTIONS }})
{
foreach ($DOTNETVERSION in ${{ env.DOTNET_VERSIONS }})
{
dotnet build $SOLUTION -c Release --framework $DOTNETVERSION
}
}
- name: Run Pipeline
run: dotnet run -c Release --framework net7.0
working-directory: "src/ModularPipelines.Build"
env:
DOTNET_ENVIRONMENT: 'Development'
GitHub__Actor: ${{ github.actor }}
GitHub__Repository__Id: ${{ github.repository_id }}
GitHub__PullRequest__Number: ${{ github.event.number }}
GitHub__PullRequest__Branch: ${{ github.event.pull_request.head.ref }}
GitHub__PullRequest__Author: ${{ github.event.pull_request.user.login }}
GitHub__StandardToken: ${{ secrets.DOTNET_FORMAT_PUSH_TOKEN }}
Publish__ShouldPublish: false
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
- name: Upload Code Coverage Results
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: '**/coverage*.xml'