-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (32 loc) · 995 Bytes
/
ci-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
# Build the CI version and run tests
name: CI Build
on:
push:
branches:
- '**'
pull_request:
branches: [ "main" ]
env:
DOTNET_VERSION: '8.0.x'
Configuration: 'Release'
jobs:
build:
name: Build project
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set Build number
id: build-id
run: echo "BUILD_ID=${{ github.ref_name }}_$(date +'%Y%j').${{github.run_attempt}}" >> "$GITHUB_OUTPUT"
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: ♻ Restore dependencies
run: dotnet restore
- name: 👷♀️ Build ${{ github.ref_name }} branch ${{ steps.build-id.outputs.BUILD_ID }}
run: dotnet build --no-restore --configuration ${{ env.CONFIGURATION }}
- name: 🧪 Test
run: dotnet test --no-build --verbosity normal