-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.41 KB
/
build.yml
File metadata and controls
60 lines (48 loc) · 1.41 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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
concurrency:
group: build_${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
permissions:
id-token: write # Allow action to get OIDC token from GitHub
contents: read
attestations: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
- name: Define VERSION
run: |
echo "COMMIT=${GITHUB_SHA:0:7}"
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}"
echo "BRANCH=${GITHUB_REF##*/}"
- name: Prebuild
run: |
dotnet build -c Debug || :
- name: Build (Debug)
run: dotnet build -c Debug
- name: Test (Debug)
run: dotnet test -c Debug --no-build -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura
- name: Build (Release)
run: dotnet build -c Release
- name: Test (Release)
run: dotnet test -c Release --no-build -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura
- name: Upload Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: false