Skip to content

Added icon

Added icon #17

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: Build and Publish
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
env:
SOLUTION: ./src/Community.Extensions.Spectre.Cli.Hosting.sln
PROJECT: ./src/Community.Extensions.Spectre.Cli.Hosting/Community.Extensions.Spectre.Cli.Hosting.csproj
CONFIG: Release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ${{ env.SOLUTION }} --no-cache
- name: Build
run: dotnet build ${{ env.SOLUTION }} --no-restore -c ${{ env.CONFIG }}
- name: Test
run: dotnet test ${{ env.SOLUTION }} --no-build --verbosity normal --configuration ${{ env.CONFIG }}
- name: Package
run: dotnet pack ${{ env.PROJECT }} --no-build -c ${{ env.CONFIG }} --output ./publish
- name: Publish
run: dotnet nuget push ./publish/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate --source "https://api.nuget.org/v3/index.json"