-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (51 loc) · 1.62 KB
/
action.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
name: build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
check_formatting:
runs-on: ubuntu-latest
name: Check Formatting
steps:
- uses: actions/checkout@v2
- run: |
dotnet tool restore
dotnet csharpier --check .
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
working-directory: AutomaticInterface
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: AutomaticInterface
- name: Test
run: dotnet test --no-restore --verbosity normal
working-directory: AutomaticInterface
publish:
runs-on: ubuntu-latest
needs: test
if: success() && startsWith(github.ref, 'refs/heads/master')
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
working-directory: AutomaticInterface
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: AutomaticInterface
- name: Nuget
run: nuget push **\release\**\AutomaticInterface.*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}