Skip to content
name: .NET New Relic Azure Site Extension Release Build
on:
release:
types: [ published ]
workflow_dispatch:
env:
scripts_path: ${{ github.workspace }}\build\scripts
tools_path: ${{ github.workspace }}\build\Tools
DOTNET_NOLOGO: true
permissions:
contents: read
# only allow one instance of this workflow to be running per PR or branch, cancels any that are already running
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run-artifactbuilder:
if: ${{ github.event.release }}
name: Run ArtifactBuilder
runs-on: windows-latest
env:
artifacts_script_path: ${{ github.workspace }}\build
nuget_helper_project_path: ${{ github.workspace }}\build\NewRelic.NuGetHelper\NewRelic.NuGetHelper.csproj
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Build NewRelic.NuGetHelper
run: |
Write-Host "Build NewRelic.NuGetHelper"
dotnet nuget list source
Write-Host "MSBuild.exe -restore -m -p:Configuration=Release -p:AllowUnsafeBlocks=true ${{ env.nuget_helper_project_path }}"
MSBuild.exe -restore -m -p:Configuration=Release -p:AllowUnsafeBlocks=true ${{ env.nuget_helper_project_path }}
shell: powershell
- name: Run ArtifactBuilder
run: |
$configuration = "Release"
$artifactBuilderCsproj = "${{ env.artifacts_script_path }}\ArtifactBuilder\ArtifactBuilder.csproj"
& "${{ env.artifacts_script_path }}\generateBuildProperties.ps1" -outputPath "${{ env.artifacts_script_path }}\BuildArtifacts\_buildProperties"
dotnet run --project "$artifactBuilderCsproj" AzureSiteExtension $configuration
shell: powershell
- name: Archive Deploy Artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: deploy-artifacts
path: |
${{ github.workspace }}
if-no-files-found: error