-
-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (38 loc) · 1.18 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
33
34
35
36
37
38
39
40
41
42
name: .NET
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Install dependencies
run: dotnet restore -s https://api.nuget.org/v3/index.json
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- uses: kzrnm/get-net-sdk-project-versions-action@v1
id: get-version
with:
proj-path: Directory.Build.props
- name: Pack
run: dotnet pack -c Release -p:PackageVersion=${{steps.get-version.outputs.package-version}}-ci.${{ github.run_number }} --no-build --no-restore
- run: cd ../
- name: publish github
run: dotnet nuget push **\*.nupkg --skip-duplicate -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/JensKrumsieck/index.json
if: ${{ github.event_name == 'push' && github.repository_owner == 'JensKrumsieck' }}