Add nuget packaging step and complete required metadata #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=============================================================================== | |
# Continuous integration workflow | |
#------------------------------------------------------------------------------- | |
# Performs continuous building on each commit or pull-requests on master | |
#=============================================================================== | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'develop' | |
- 'feature*/**' | |
pull_request: | |
branches: | |
- '**' | |
env: | |
Configuration: Release | |
ContinuousIntegrationBuild: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_NOLOGO: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true | |
permissions: | |
checks: write # Required for writing test reports | |
jobs: | |
build: | |
name: π οΈ Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: π¨βπ» Check-out code | |
uses: actions/checkout@v4 | |
- name: π¨βπ§ Setup .NET Core SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.x | |
7.x | |
8.x | |
- name: βΉοΈ Show dotnet details | |
run: dotnet --info | |
- name: πΎ Enable package caching | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: π₯ Restore packages | |
run: dotnet restore | |
- name: ποΈ Build code | |
run: dotnet build --no-restore | |
- name: π¨ Test code | |
run: dotnet test --no-build | |
continue-on-error: true | |
- name: π¦ Create NuGet package | |
run: dotnet pack --no-build --output . |