forked from Azure/DotNetty
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.06 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
42
43
44
45
name: Build
on:
push:
paths:
- '.github/workflows/build.yml'
- 'src/**'
workflow_dispatch:
inputs:
publish:
description: 'Publish package'
default: false
required: false
type: boolean
jobs:
build:
env:
BUILD_CONFIG: release
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c ${{ env.BUILD_CONFIG }} --no-restore -p:ContinuousIntegrationBuild=true
#- name: Test
# run: dotnet test -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Publish
if: ${{ inputs.publish }}
run: |
dotnet pack -c ${{ env.BUILD_CONFIG }} --no-build
dotnet nuget push build_output/packages/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json