Skip to content

Merge pull request #17 from jtucholski/main #35

Merge pull request #17 from jtucholski/main

Merge pull request #17 from jtucholski/main #35

Workflow file for this run

name: .NET Build
on:
push:
branches: [ production ]
pull_request:
branches: [ production ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Build
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.200
- 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: Pack nugets
run: dotnet pack MenuFramework/MenuFramework.csproj -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
# deploy:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/production'
# steps:
# - uses: actions/checkout@v4
# - name: Publish MenuFramework
# uses: brandedoutcast/publish-nuget@v2.5.5
# with:
# PROJECT_FILE_PATH: MenuFramework/MenuFramework.csproj
# NUGET_KEY: ${{secrets.NUGET_API_KEY}}