-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (33 loc) · 1.14 KB
/
Copy pathbuild.yml
File metadata and controls
45 lines (33 loc) · 1.14 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
name: Build Solution Template
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Restore dependencies
run: dotnet restore src/function
- name: Build
run: dotnet build src/function --no-restore
- name: Test
run: dotnet test src/function --no-build --verbosity normal
- name: Publish solution code a folder called compiledFunction
run: dotnet publish src/function -c Release -o compiledFunction
- name: Zip the compiledFunction folder (requires changing path to the source folder)
run: (cd compiledFunction && zip -r ../src/solution-template/function.zip .)
- name: Create and upload solution-template zip file
uses: actions/upload-artifact@v2.2.0
with:
# Artifact name
name: solution-template
# file, directory or wildcard pattern describing the content to upload
path: src/solution-template
if-no-files-found: error