csharp-sdk/.github/workflows/ci.yml
Toni Wenzel 80daa5b73d
Add ci build workflow (#31)
* Add ci build workflow

* Using cake build

* Update readme
2025-03-06 20:49:59 +01:00

43 lines
No EOL
1 KiB
YAML

name: .NET Build, Test and publish
on:
push:
branches: [ "main", "master" ]
paths: [ 'src/**' ]
pull_request:
branches: [ "main", "master" ]
paths: [ 'src/**' ]
release:
types: [published,edited]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
8.0.x
9.0.x
- name: Run Cake script
uses: cake-build/cake-action@v1
with:
verbosity: Diagnostic
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY}}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}