-
-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (56 loc) · 2.23 KB
/
dotnet-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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 (Mac)
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 src/ModularPipelines.Google/ModularPipelines.Google.sln
jobs:
pipeline-mac:
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Pull Requests' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Cache NuGet
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
- name: Build ModularPipelines.Analyzers.sln
run: dotnet build ModularPipelines.Analyzers.sln -c Release
- name: Build
run: |
for SOLUTION in ${{ env.SOLUTIONS }}
do
dotnet build $SOLUTION -c Release
done
- name: Run Pipeline
run: dotnet run -c Release --framework net8.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@v4
with:
name: code-coverage
path: '**/*cobertura*'