-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 1.07 KB
/
dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/Zen.sln
- name: Build
run: dotnet build --no-restore src/Zen.sln --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal src/Zen.sln --configuration Release
- name: Publish the package to NuGet
run: dotnet nuget push src/Zen.Z80/bin/Release/*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish the package to GitHub
run: dotnet nuget push src/Zen.Z80/bin/Release/*.nupkg -k ${{secrets.GH_KEY}} -s https://nuget.pkg.github.com/stevehjohn/index.json --skip-duplicate