Skip to content

Develop

Develop #240

Workflow file for this run

name: Build .NET Library
on:
pull_request:
branches: [ develop, main ]
release:
types:
- published
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4.1.1
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
# Artifact name
name: qatoolkit-core-net-${{ matrix.os }}.zip
# A file, directory or wildcard pattern that describes what to upload
path: src/QAToolKit.Core/bin/
deploy:
name: Pack and Push Nuget
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Pack NuGet
uses: brandedoutcast/publish-nuget@v2.5.5
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: src/QAToolKit.Core/QAToolKit.Core.csproj
VERSION_FILE_PATH: Directory.Build.props
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
TAG_COMMIT: true