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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: deploy-artifacts
path: |
${{ github.workspace }}
if-no-files-found: error