|
12 | 12 | - 'Extensions.Enrichment-*' # trigger when we create a tag with prefix "Extensions.Enrichment-" |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - build-test-pack: |
16 | | - runs-on: ${{ matrix.os }} |
17 | | - permissions: |
18 | | - contents: write |
19 | | - env: |
20 | | - PROJECT: OpenTelemetry.Extensions.Enrichment |
21 | | - |
22 | | - strategy: |
23 | | - matrix: |
24 | | - os: [windows-latest] |
25 | | - |
26 | | - steps: |
27 | | - - uses: actions/checkout@v4 |
28 | | - with: |
29 | | - fetch-depth: 0 # fetching all |
30 | | - |
31 | | - - name: Setup dotnet |
32 | | - uses: actions/setup-dotnet@v4 |
33 | | - |
34 | | - - name: Install dependencies |
35 | | - run: dotnet restore src/${{env.PROJECT}} |
36 | | - |
37 | | - - name: dotnet build ${{env.PROJECT}} |
38 | | - run: dotnet build src/${{env.PROJECT}} --configuration Release --no-restore -p:Deterministic=true |
39 | | - |
40 | | - - name: dotnet test ${{env.PROJECT}} |
41 | | - run: dotnet test test/${{env.PROJECT}}.Tests |
42 | | - |
43 | | - - name: dotnet pack ${{env.PROJECT}} |
44 | | - run: dotnet pack src/${{env.PROJECT}} --configuration Release --no-build |
45 | | - |
46 | | - - name: Publish Artifacts |
47 | | - uses: actions/upload-artifact@v4 |
48 | | - with: |
49 | | - name: ${{env.PROJECT}}-packages |
50 | | - path: '**/${{env.PROJECT}}/bin/**/*.*nupkg' |
51 | | - |
52 | | - - name: Publish Nuget |
53 | | - run: | |
54 | | - nuget push **/${{env.PROJECT}}/bin/**/*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_TOKEN }} -SymbolApiKey ${{ secrets.NUGET_TOKEN }} |
55 | | -
|
56 | | - - name: Create GitHub Prerelease |
57 | | - if: ${{ (contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') || contains(github.ref_name, '-rc.')) }} |
58 | | - run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --verify-tag --notes "See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/${{ github.ref_name }}/src/${{env.PROJECT}}/CHANGELOG.md) for details." --prerelease |
59 | | - env: |
60 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
61 | | - |
62 | | - - name: Create GitHub Release |
63 | | - if: ${{ !(contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') || contains(github.ref_name, '-rc.')) }} |
64 | | - run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --verify-tag --notes "See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/${{ github.ref_name }}/src/${{env.PROJECT}}/CHANGELOG.md) for details." --latest |
65 | | - env: |
66 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 15 | + call-build-test-pack: |
| 16 | + uses: ./.github/workflows/Component.Package.yml |
| 17 | + with: |
| 18 | + project: src/OpenTelemetry.Extensions.Enrichment/OpenTelemetry.Extensions.Enrichment.csproj |
| 19 | + secrets: inherit |
0 commit comments