-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.36 KB
/
app-build-dotnet.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
name: app-build-dotnet
on:
workflow_call:
inputs:
fullSemVer:
type: string
description: e.g. 1.2.301-feature-my-feature.12
required: true
configuration:
type: string
description: e.g. Debug or Release
default: Release
solution-name:
type: string
description: e.g. MySolution.sln or MyProject.csproj
default: ''
dotnet-restore-args:
type: string
description: Optional 'dotnet restore' arguments.
default: ''
dotnet-build-args:
type: string
description: Optional 'dotnet build' arguments.
default: ''
jobs:
app-build-dotnet:
runs-on: ubuntu-latest
#if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: dotnet restore
run: dotnet restore ${{ inputs.solution-name }} --verbosity minimal ${{ inputs.dotnet-restore-args }}
- name: dotnet build
run: dotnet build ${{ inputs.solution-name }} -c ${{ inputs.configuration }} --nologo --no-restore -p:Version='${{ inputs.fullSemVer }}' -p:SourceRevisionId=${{ github.sha }} ${{ inputs.dotnet-build-args }}
#TODO: could run dotnet test here, etc...