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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: deploy-artifacts
path: |
${{ github.workspace }}
if-no-files-found: error