-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (37 loc) · 1.08 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
name: nssl Build
on:
workflow_dispatch:
inputs:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
jobs:
build:
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
- name: Get Git Submodules
run: git submodule update --init --recursive
- name: Build
run: dotnet build --configuration Release
- name: Create Nuget Package
run: dotnet pack -c Release -o ./artifacts
if: matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'
- name: Deploy Nuget Package
run: dotnet nuget push ./artifacts/'*.nupkg' -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
shell: bash
if: matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'