Skip to content

Bump Serilog from 3.1.1 to 4.1.0 in /src #248

Bump Serilog from 3.1.1 to 4.1.0 in /src

Bump Serilog from 3.1.1 to 4.1.0 in /src #248

Workflow file for this run

name: Release
on:
push:
branches:
- master
- release-*
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
jobs:
release:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: windows-2022
steps:
- name: Check for secrets
env:
SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }}
shell: pwsh
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 8.0.200 # Locked until VS/MSBuild is compatible with 8.0.300
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build
run: msbuild src -p:Configuration=Release -restore -m
- name: Setup Advanced Installer
run: |
$version = "20.2.1"
choco install advanced-installer --version=$version
& "C:\Program Files (x86)\Caphyon\Advanced Installer $version\bin\x86\AdvancedInstaller.com" /register ${{ secrets.ADVANCED_INSTALLER_LICENSE_KEY }}
- name: Prepare AIP file
run: |
$content = Get-Content -Raw -Path src/Setup/ServiceInsight.aip
$content = $content -replace "replace-tenant-id", "${{ secrets.AZURE_KEY_VAULT_TENANT_ID }}" -replace "replace-app-id", "${{ secrets.AZURE_KEY_VAULT_CLIENT_ID }}" -replace "replace-cert-name", "${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }}"
Set-Content src/Setup/ServiceInsight.aip $content
- name: Build Windows installer
env:
AZURE_KEY_VAULT_CLIENT_SECRET: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }}
run: dotnet build src/Setup --configuration Release
- name: Publish artifacts
uses: actions/[email protected]
with:
name: assets
path: assets/*
retention-days: 1
- name : Verify release artifact counts
shell: pwsh
run: |
$assetsCount = (Get-ChildItem -Recurse -File assets).Count
$expectedAssetsCount = 1
if ($assetsCount -ne $expectedAssetsCount)
{
Write-Host Assets: Expected $expectedAssetsCount but found $assetsCount
exit -1
}
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
# Does not follow standard practice of targeting explicit versions because configuration is tightly coupled to Octopus Deploy configuration
uses: Particular/push-octopus-package-action@main
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}