-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (70 loc) · 2.16 KB
/
dotnet.yml
File metadata and controls
71 lines (70 loc) · 2.16 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
dotnet-version: [6.0.x]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: ${{matrix.dotnet-version}}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: dotnet test
run: dotnet test
publish:
needs: build
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
dotnet-version: [6.0.x]
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: run file
run: echo ${{ github.server_url }}/${{ github.repository }}
- name: Setup .Net
uses: actions/setup-dotnet@main
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Build
run: dotnet publish
- name: Nuget Package And Upload
uses: csharp-opensource/publish-nuget@master
with:
releaseVersion: ${{ github.event.release.tag_name }}
repoUrl: ${{ github.server_url }}/${{ github.repository }}
nugetToken: ${{ secrets.NUGET_AUTH_TOKEN }}
nugetSource: https://api.nuget.org/v3/index.json