-
Notifications
You must be signed in to change notification settings - Fork 20
34 lines (32 loc) · 1.07 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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.102
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Publish
run: dotnet publish --configuration Release
- name: Upload SmartGlass.Cli Artifact
if: ${{ success() && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: actions/upload-artifact@v2
with:
name: SmartGlass.Cli
path: SmartGlass.Cli/bin/Release/net5.0/publish/
- name: Create tag and publish to nuget
if: ${{ success() && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: SmartGlass/SmartGlass.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}