Skip to content

fixed layout

fixed layout #41

Workflow file for this run

name: Build and Package
on:
push:
branches:
- main
jobs:
build_and_pack:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ vars.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ${{ github.workspace }}/${{ vars.PROJECT_NAME }}/${{ vars.PROJECT_NAME }}.sln
- name: Clean
run: dotnet clean ${{ github.workspace }}/${{ vars.PROJECT_NAME }}/${{ vars.PROJECT_NAME }}.sln --configuration Release
- name: Build
run: dotnet build ${{ github.workspace }}/${{ vars.PROJECT_NAME }}/${{ vars.PROJECT_NAME }}.sln --configuration Release --no-restore
- name: Package
run: dotnet pack ${{ github.workspace }}/${{ vars.PROJECT_NAME }}/${{ vars.PROJECT_NAME }}.sln --configuration Release --output nupkgs
- name: Setup NuGet CLI
run: |
curl -L https://dist.nuget.org/win-x86-commandline/latest/nuget.exe --output nuget.exe
- name: Create Nuget Config
run: |
./nuget.exe config
./nuget.exe setapikey "${{ secrets.NUGET_API_KEY }}" -verbosity quiet
- name: Publish NuGet Package
run: nuget push .\nupkgs\*.nupkg -Source "https://api.nuget.org/v3/index.json"
if: github.ref == 'refs/heads/main' && github.event_name == 'push'