This repository has been archived by the owner on Feb 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
99 lines (94 loc) · 3.24 KB
/
release-draft.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Release draft
on:
push:
tags:
- 'v*'
jobs:
linux_build:
name: Linux Build
runs-on: ubuntu-20.04
strategy:
matrix:
baseImage: [alpine, debian]
timeout-minutes: 30
env:
baseImage: ${{ matrix.baseImage }}
dotnetSdkVersion: 7.0.406
steps:
- uses: actions/checkout@v3.5.3
- name: Build Docker image
run: |
docker build \
--build-arg DOTNETSDK_VERSION=${dotnetSdkVersion} \
--tag dd-trace-dotnet/${baseImage}-builder \
--target builder \
--file "./tracer/build/_build/docker/${baseImage}.dockerfile" \
"./tracer/build/_build"
- name: Run 'Clean BuildTracerHome ZipMonitoringHome' in Docker
run: |
docker run --rm \
--mount type=bind,source="${GITHUB_WORKSPACE}",target=/project \
--env NugetPackageDirectory=/project/packages \
--env tracerHome=/shared/bin/monitoring-home/tracer \
--env artifacts=/project/tracer/src/bin/artifacts \
dd-trace-dotnet/${baseImage}-builder \
/bin/sh -c 'git config --global --add safe.directory /project && ./tracer/build.sh Clean BuildTracerHome ZipMonitoringHome'
- name: Upload Linux x64 packages
uses: actions/upload-artifact@v3.1.2
with:
name: artifacts
path: ./tracer/src/bin/artifacts/linux-x64
windows_build:
name: Windows Build
runs-on: windows-2022
timeout-minutes: 30
steps:
- run: git config --system core.longpaths true
- uses: actions/checkout@v3.5.3
- uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: |
2.1.818
3.1.426
5.0.408
6.0.419
7.0.406
8.0.200
- run: tracer\build.cmd Clean BuildTracerHome PackageTracerHome
shell: cmd
- name: Upload Windows MSI
uses: actions/upload-artifact@v3.1.2
with:
name: artifacts
path: |
tracer/bin/artifacts/*/en-us
Splunk.SignalFx.DotNet.psm1
- name: Upload NuGet packages
uses: actions/upload-artifact@v3.1.2
with:
name: nuget
path: tracer/bin/artifacts/nuget/SignalFx.NET.Tracing.Azure.Site.Extension.*.nupkg
- name: Upload Windows Zip package
uses: actions/upload-artifact@v3.1.2
with:
name: zip
path: tracer/bin/artifacts/signalfx-dotnet-tracing-*.zip
create-release:
name: Create GH release
runs-on: ubuntu-20.04
needs: [ linux_build, windows_build ]
permissions:
contents: write
timeout-minutes: 10
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/download-artifact@v3.0.2
with:
path: .
- name: Extract Version from Tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v}
- name: Create Release
run: gh release create v${{ steps.get_version.outputs.VERSION }} --draft artifacts/*.psm1 artifacts/signalfx* artifacts/tracer/bin/artifacts/x64/en-us/*.msi artifacts/tracer/bin/artifacts/x86/en-us/*.msi zip/signalfx-dotnet-tracing-*.zip nuget/SignalFx.NET.Tracing.Azure.Site.Extension.*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}