Skip to content

Add Azure pipelines #69

Add Azure pipelines

Add Azure pipelines #69

# 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: [ "V2" ]
pull_request:
branches: [ "V2" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Upload CI
if: matrix.os == 'ubuntu-latest'
run: |
dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Azyyyyyy/index.json"
dotnet pack --output packages
dotnet nuget push "packages/*.nupkg" --api-key ${{ secrets.NUGET_PUSH_KEY }} --source "github"