-
Notifications
You must be signed in to change notification settings - Fork 28
58 lines (45 loc) · 1.36 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
48
49
50
51
52
53
54
55
56
57
58
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
type: published
env:
BuildVersion: "CI.${{ github.run_id }}"
BuildBranch: "${{ github.ref }}"
BuildParameters: "/v:Minimal /p:Configuration=Release Eto.Parse.sln"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Build
run: dotnet build ${{ env.BuildParameters }}
- name: Pack
run: dotnet pack ${{ env.BuildParameters }}
- name: Test
run: dotnet test --no-build --filter TestCategory!=not-working ${{ env.BuildParameters }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: nuget
path: artifacts/nuget/**/*.nupkg
publish:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Download NuGet Packages
uses: actions/[email protected]
with:
name: nuget
- name: Push packages
run: dotnet nuget push './nuget/**/*.nupkg' --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}