Skip to content

Add nuget packaging step and complete required metadata #77

Add nuget packaging step and complete required metadata

Add nuget packaging step and complete required metadata #77

Workflow file for this run

#===============================================================================
# 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 .