-
Notifications
You must be signed in to change notification settings - Fork 723
62 lines (50 loc) · 1.69 KB
/
copilot-build-backend.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
name: copilot-build-backend
on:
pull_request:
branches: ["main"]
merge_group:
branches: ["main"]
workflow_call:
outputs:
artifact:
description: "The name of the uploaded artifact."
value: ${{jobs.webapi.outputs.artifact}}
permissions:
contents: read
jobs:
webapi:
strategy:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: windows-latest }
runs-on: ${{ matrix.os }}
env:
NUGET_CERT_REVOCATION_MODE: offline
outputs:
artifact: ${{steps.artifactoutput.outputs.artifactname}}
steps:
- uses: actions/checkout@v3
with:
clean: true
- name: Package Copilot Chat WebAPI
run: |
scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy
- name: Check formatting of Copilot Chat WebAPI
run: |
cd webapi/
dotnet format --verify-no-changes --verbosity diagnostic
- name: Set version tag
id: versiontag
run: |
$VERSION_TAG="$(Get-Date -Format "MMddHHmmss")"
echo $VERSION_TAG
Write-Output "versiontag=$VERSION_TAG" >> $env:GITHUB_OUTPUT
- name: Upload package to artifacts
uses: actions/upload-artifact@v3
with:
name: copilotchat-webapi-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\scripts\deploy\out\webapi.zip
- name: "Set outputs"
id: artifactoutput
run: Write-Output "artifactname=copilotchat-webapi-${{ steps.versiontag.outputs.versiontag }}" >> $env:GITHUB_OUTPUT