Workflow file for this run
This file contains 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: .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@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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: deploy-artifacts | |
path: | | |
${{ github.workspace }}\build\BuildArtifacts | |
if-no-files-found: error |