forked from DiscUtils/DiscUtils
-
-
Notifications
You must be signed in to change notification settings - Fork 25
41 lines (31 loc) · 1001 Bytes
/
build-test.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: CI Build
on: [push, pull_request]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
lfs: 'true'
- run: git fetch --tags
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Debug --no-restore
- name: Test
run: dotnet test -c Debug
- name: Pack
if: github.ref == 'refs/heads/develop'
run: dotnet pack -c Release -o ${{ github.workspace }}/build
- name: "GitHub packages: NuGet push"
if: github.ref == 'refs/heads/develop'
run: dotnet nuget push *.nupkg --no-symbols 1 --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
working-directory: ${{ github.workspace }}/build