-
-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (39 loc) · 1.5 KB
/
master.yml
File metadata and controls
50 lines (39 loc) · 1.5 KB
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
name: Build, Test, and Deploy
on:
push:
branches:
- master
paths-ignore:
- 'samples/**'
pull_request:
branches:
- master
env:
DOTNET_2_VERSION: 2.1.808
DOTNET_3_VERSION: 3.1.302
DOTNET_5_VERSION: 5.0.100-preview.6.20318.15
BUILD_CONFIGURATION: Release
jobs:
build-test-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: coderpatros/setup-dotnet@sxs
with:
dotnet-version: ${{ env.DOTNET_2_VERSION }},${{ env.DOTNET_3_VERSION }},${{ env.DOTNET_5_VERSION }}
- name: Build
run: dotnet build --configuration ${{ env.BUILD_CONFIGURATION }}
- name: Unit Test
run: dotnet test --configuration ${{ env.BUILD_CONFIGURATION }}
- uses: aarnott/nbgv@v0.3
with:
setAllVars: true
- name: Pack
run: dotnet pack --configuration ${{ env.BUILD_CONFIGURATION }}
- name: Push to feedz.io
run: dotnet nuget push **/*.nupkg -k ${{ secrets.FEEDZ_API_KEY }} -s https://f.feedz.io/forevolve/localization/nuget/index.json
if: github.event_name == 'pull_request'
- name: Push to NuGet.org
run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
if: github.event_name == 'push'