-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (56 loc) · 1.78 KB
/
blueprint-build.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
62
63
64
65
66
67
68
69
70
name: Blueprint Build
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
## CI Trigger on master branch
on:
push:
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- '**/*.md'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET SDK 6.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '6.0.x'
- name: Setup .NET SDK 5.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '5.0.x'
#- name: SonarCloud Preparation
# uses: sonarsource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: dotnet restore
run: dotnet restore
- name: dotnet build
run: dotnet build --configuration Release --no-restore
- name: dotnet test
run: dotnet test --configuration Release --no-build --no-restore
- name: dotnet pack
run: dotnet pack --configuration Release --output ${{ github.workspace }}/.nupkgs -verbosity:minimal --no-build
if: ${{ success() && github.event_name != 'pull_request' }}
- name: dotnet nuget push
run: dotnet nuget push "*.nupkg" --source "https://nuget.pkg.github.com/barclayadam/index.json" --api-key "$env:TOKEN"
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{ github.workspace }}/.nupkgs
if: ${{ success() && github.event_name != 'pull_request' }}
#- name: Analyze with SonarCloud
# uses: sonarsource/sonarcloud-github-action@master
#- name: Publish SonarCloud results
# uses: actions/SonarCloudPublish@1
# with:
# pollingTimeoutSec: '300'