Skip to content

Commit

Permalink
Added build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jakenuts committed Dec 13, 2023
1 parent d955610 commit be5259c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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/Spectre.Console.Extensions.Hosting.sln
PROJECT: /src/Spectre.Console.Extensions.Hosting/Spectre.Console.Extensions.Hosting.csproj
CONFIG: Release

steps:
- uses: actions/checkout@v3
- 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 }} -c ${{ env.CONFIG }} --output ./publish

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*.userosscache
*.sln.docstates


# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

Expand Down

0 comments on commit be5259c

Please sign in to comment.