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-2019
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1
- 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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: deploy-artifacts
path: |
${{ github.workspace }}\build\BuildArtifacts
if-no-files-found: error