Update dependency Microsoft.Build.NoTargets to 3.7.134 #684
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check for secrets | |
| env: | |
| SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }} | |
| run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 }) | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v6.0.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v1.3 | |
| - 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: msbuild src/Setup -p:Configuration=Release -restore -m | |
| - name: Publish artifacts | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: assets | |
| path: assets/* | |
| retention-days: 1 | |
| - name : Verify release artifact counts | |
| 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 }} |