-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.31 KB
/
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
51
52
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Build project
on:
push:
branches:
- main
paths-ignore:
- "README.md"
pull_request:
workflow_dispatch:
permissions:
packages: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
project: [
"FunctionApp",
"Lib",
"AdminConsole"
]
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install .NET tools
run: dotnet tool restore
- name: Update project files with gitversion
run: dotnet tool run dotnet-gitversion /updateprojectfiles
- name: Setup GitHub Packages source
run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Build project
shell: pwsh
run: dotnet restore "./src/${{ matrix.project }}/" ; dotnet build "./src/${{ matrix.project }}/"