-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (40 loc) · 1.07 KB
/
dotnet.yml
File metadata and controls
49 lines (40 loc) · 1.07 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
name: Build Solution
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
inputs:
name:
description: 'Manual trigger'
required: true
default: 'Manual trigger'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.417
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
publish:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Build
run: dotnet build -c Release
- name: Pack
run: dotnet pack -c Release -o . --no-build
- name: Push
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }}