-
-
Notifications
You must be signed in to change notification settings - Fork 18
40 lines (36 loc) · 1000 Bytes
/
build.yml
File metadata and controls
40 lines (36 loc) · 1000 Bytes
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
name: Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Versions
env:
VERSION_PREFIX: 1.2
VERSION_SUFFIX: ${{github.run_number}}
run: |
VERSION=$VERSION_PREFIX.$VERSION_SUFFIX
sed -i "s:<Version>1.0.0</Version>:<Version>$VERSION</Version>:g" ListDiff/ListDiff.csproj
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.301
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build --verbosity normal -c Release
- name: Pack
run: |
mkdir -p artifacts
dotnet pack --no-build -c Release --include-symbols -o artifacts
- name: Archive
uses: actions/upload-artifact@master
with:
path: artifacts