Skip to content

Build and Test

Build and Test #7

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-and-test:
runs-on: windows-latest
steps:
- name: Setup MSBuild for NetFX
uses: microsoft/setup-msbuild@v2
with:
vs-version: 17.0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Checkout code
uses: actions/checkout@v4
with:
show-progress: false
- name: Restore NuGet packages
run: nuget restore ./DocGpt.sln
- name: Run unit tests
run: dotnet test ./DocGpt.Test/DocGpt.Test.csproj --configuration Release
- name: Build Extension
run: msbuild ./DocGpt.sln -p:Configuration=Release -t:Rebuild
- name: Sign Extension
run: lib\win\openvsixsigntool.exe sign -t "http://timestamp.digicert.com" ".\DocGpt.Vsix\bin\Release\DocGPT.vsix" -kvu "https://${{ secrets.AZURE_KEYVAULT_NAME }}.vault.azure.net" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.SIGNING_CERTIFICATE_NAME }}"