-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.53 KB
/
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
name: build-test-and-publish-nuget
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
publish:
name: build, test & publish
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Clean nuget
run: dotnet nuget locals all --clear
- name: Build
run: dotnet build -c Release
- name: Test
if: success()
run: dotnet test -c Release
# Publish dsian.TwinCAT.Ads.Server.Mock
- name: publish on version change
id: publish_nuget_mock
if: ${{ success() && (github.event_name == 'push' || github.ref == 'refs/heads/main')}}
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/dsian.TwinCAT.Ads.Server.Mock/dsian.TwinCAT.Ads.Server.Mock.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# Publish dsian.TwinCAT.Ads.Server.Mock.Extensions
- name: publish on version change
id: publish_nuget_mock_extensions
if: ${{ success() && (github.event_name == 'push' || github.ref == 'refs/heads/main')}}
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/dsian.TwinCAT.Ads.Server.Mock.Extensions/dsian.TwinCAT.Ads.Server.Mock.Extensions.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}