Skip to content

Feature/prod 2955/add traces to hz cache #80

Feature/prod 2955/add traces to hz cache

Feature/prod 2955/add traces to hz cache #80

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main", "release/*", "feature/*", "bugfix/*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Extract branch name if release
if: startsWith(github.ref, 'refs/heads/release') != true
shell: bash
run: echo "BRANCH=0.0.1" >> $GITHUB_ENV
- name: Extract branch name if not release
if: startsWith(github.ref, 'refs/heads/release')
shell: bash
run: echo "BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 4)" >> $GITHUB_ENV
- name: Build
run: dotnet build --no-restore /property:Version=${{ env.BRANCH }}
- name: Test
run: dotnet test --no-build --verbosity normal --filter "TestCategory!=Integration"
- name: Publish
if: startsWith(github.ref, 'refs/heads/release')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}