Skip to content

add CD pipeline

add CD pipeline #1

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: odata2linq-cd
on:
push:
tags:
- 'OData2Linq_*.*.*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['6.0.x']
steps:
- uses: actions/checkout@v4
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore ./AspNetCoreOData.sln
- name: Build
run: dotnet build ./AspNetCoreOData.sln -c Release --no-restore
- name: Test
run: dotnet test ./AspNetCoreOData.sln -c Release --no-build --verbosity normal
- name: Pack
run: dotnet pack ./src/OData2Linq.csproj -c Release -o .\artifacts --no-build
- name: Publish to NuGet
run: dotnet nuget push .\artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}