Skip to content

Merge pull request #2 from Meerownymous/bump-tonga #3

Merge pull request #2 from Meerownymous/bump-tonga

Merge pull request #2 from Meerownymous/bump-tonga #3

Workflow file for this run

name: CI/CD Workflow
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
build-and-test:
name: Build and Test
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Run Tests
run: dotnet test --no-build --verbosity normal --configuration Release
publish:
name: Publish to NuGet
runs-on: windows-latest
needs: build-and-test
if: github.ref_type == 'tag'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Pack NuGet Package
run: dotnet pack --no-build --configuration Release --output ./nupkg
- name: Publish to NuGet
run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json