Skip to content

Commit

Permalink
added nuget package build + publish (#69)
Browse files Browse the repository at this point in the history
Pushes only from master and tags.
  • Loading branch information
freddyrios committed Mar 9, 2021
1 parent be9ca72 commit b993141
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: build

on:
push:
tags: '*'
branches: [ master ]
pull_request:
branches: [ master ]
Expand All @@ -13,13 +14,23 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test -c Release --no-build --verbosity normal
- name: Pack CA.LoopControlPluginBase
run: dotnet pack CA.LoopControlPluginBase -c Release -o out
- name: Pack CA_DataUploaderLib
run: dotnet pack CA_DataUploaderLib -c Release -o out
- name: Push generated package to nuget
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags') }}
run: dotnet nuget push out/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.CA_NUGET_PACKAGES_KEY }}

0 comments on commit b993141

Please sign in to comment.