-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.18 KB
/
build_pr.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
name: Build (pr)
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- id: make_version_string
uses: sandersaares-actions/make-time-based-version-string@main
with:
buildType: pr
- id: make_nuget_version_string
uses: sandersaares-actions/make-time-based-nuget-version-string@main
with:
versionstring: ${{ steps.make_version_string.outputs.VERSION_STRING }}
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-restore --verbosity normal --filter Name\\!~_WindowsOnly
- name: Package
run: dotnet pack --configuration Release --no-restore --output . --include-symbols -p:SymbolPackageFormat=snupkg -p:PackageVersion="${{ steps.make_nuget_version_string.outputs.NUGET_VERSION_STRING }}"
- uses: actions/upload-artifact@v2
with:
name: nupkg
path: |
*.nupkg
*.snupkg