This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (45 loc) · 1.8 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deploy packages to Nuget
on:
workflow_dispatch:
inputs:
run_id:
description: 'Run ID of the Workflow run that should be deployed. ID can be found in URL for run.'
required: true
telemetrysdk:
description: 'If "true", will push the Telemetry SDK Nuget package and symbols to Nuget. If "false", will not.'
required: true
default: 'false'
env:
telemetrysdk_path: ${{ github.workspace }}\NewRelic.Telemetry\bin\Release
nuget_source: https://api.nuget.org/v3/index.json
jobs:
get-archive-deploy-packages:
name: Get, archive, and deploy packages
runs-on: windows-2019
steps:
- name: Download Deploy Artifacts
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: main.yml
run_id: ${{ github.event.inputs.run_id }}
name: my-artifact-${{ github.event.inputs.run_id }}
path: ${{ github.workspace }}
repo: ${{ github.repository }}
- name: Archive Telemetry SDK Artifacts
if: ${{ github.event.inputs.telemetrysdk == 'true' }}
uses: actions/upload-artifact@v2
with:
name: deploy-telemetrysdk-artifacts-${{ github.run_id }}
path: ${{ env.telemetrysdk_path }}\*.*nupkg
if-no-files-found: error
- name: Setup Nuget Add to Path
uses: nuget/setup-nuget@v1.0.5
with:
nuget-version: '5.x'
- name: Publish Telemetry SDK to Nuget
if: ${{ github.event.inputs.telemetrysdk == 'true' }}
run: |
foreach ($file in Get-ChildItem -Path "${{ env.telemetrysdk_path }}\*" -File -Include *.nupkg) {
nuget push $file.fullname -ApiKey ${{ secrets.NUGET_APIKEY }} -Source ${{ env.nuget_source }} }
shell: powershell