-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (79 loc) · 2.94 KB
/
template_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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build
on:
workflow_call:
inputs:
Configuration:
required: true
type: string
NUGETVERSIONV2:
required: true
type: string
SlnPath:
required: true
type: string
SdkCsprojPath:
required: true
type: string
SampleSiteCsprojPath:
required: true
type: string
SystemTestsCsprojPath:
required: true
type: string
UnitTestsCsprojPath:
required: true
type: string
env:
dotnetVersion: |
6.x
7.x
8.x
AZURE_WEBAPP_PACKAGE_PATH: '.'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnetVersion }}
- name: Install dependencies
run: dotnet restore ${{ inputs.SlnPath }}
- name: Publish Sdk Sample site
run: dotnet publish --configuration ${{ inputs.Configuration }} -p:Version=${{ inputs.nuGetVersionV2 }} --no-restore ${{ inputs.SampleSiteCsprojPath }} --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/samplesite'
- name: Archive Sample.AspNetCore
uses: actions/upload-artifact@v4
with:
name: Sample.AspNetCore
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/samplesite
- name: Publish Sdk Unit tests
run: dotnet publish --configuration ${{ inputs.Configuration }} -p:Version=${{ inputs.nuGetVersionV2 }} --no-restore ${{ inputs.UnitTestsCsprojPath }} --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/unittests'
- name: Archive Sdk Unit tests
uses: actions/upload-artifact@v4
with:
name: Sdk.UnitTests
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/unittests
- name: Verify chrome driver
shell: pwsh
run: |
./src/Samples/Sample.AspNetCore.SystemTests/chrome-driver-udpate.ps1
- name: Publish Sdk Sample site system test
run: dotnet publish --configuration ${{ inputs.Configuration }} -p:Version=${{ inputs.nuGetVersionV2 }} --no-restore ${{ inputs.SystemTestsCsprojPath }} --output '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/systemtests'
- name: Archive Sample.AspNetCore.SystemTests
uses: actions/upload-artifact@v4
with:
name: Sample.AspNetCore.SystemTests
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/systemtests
- name: Nuget pack
run: dotnet pack ${{ inputs.SdkCsprojPath }} -p:PackageVersion=${{ inputs.NUGETVERSIONV2 }} -p:Version=${{ inputs.NUGETVERSIONV2 }} --no-restore --configuration=${{ inputs.Configuration }} --output=artifacts
- name: Archive nuget packages artifacts
uses: actions/upload-artifact@v4
with:
# Artifact name
name: packages
# A file, directory or wildcard pattern that describes what to upload
path: |
artifacts/*.nupkg
artifacts/*.snupkg