-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (37 loc) · 1.46 KB
/
pr-build.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
43
44
45
46
47
48
49
50
name: Repository PR Build
permissions:
packages: read
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '6.0.x', '7.0.x', '8.0.x' ]
steps:
- uses: actions/checkout@v4
- name: Add GitHub Nuget As Source
run: dotnet nuget add source https://nuget.pkg.github.com/deveel/index.json --name github --username tsutomi --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Emit .NET 6.0 Framework Version
if: matrix.dotnet == '6.0.x'
run: echo "DOTNET_FX_VERSION=net6.0" >> $GITHUB_ENV
- name: Emit .NET 7.0 Framework Version
if: matrix.dotnet == '7.0.x'
run: echo "DOTNET_FX_VERSION=net7.0" >> $GITHUB_ENV
- name: Emit .NET 8.0 Framework Version
if: matrix.dotnet == '8.0.x'
run: echo "DOTNET_FX_VERSION=net8.0" >> $GITHUB_ENV
- name: Setup .NET ${{ matrix.dotnet }} Framework
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Install SQLite Spatial
run: sudo apt-get install -y libsqlite3-mod-spatialite
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --version-suffix $GITHUB_RUN_ID -c Release -f ${{ env.DOTNET_FX_VERSION }}
- name: Test
run: dotnet test --no-build --no-restore -c Release -f ${{ env.DOTNET_FX_VERSION }} --verbosity normal