Skip to content

Merge branch 'main' of github.com:dotTinyNet/WiringXSharp #3

Merge branch 'main' of github.com:dotTinyNet/WiringXSharp

Merge branch 'main' of github.com:dotTinyNet/WiringXSharp #3

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x' # Adjust to your project's .NET version
- name: Set VERSION
run: echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')" >> $GITHUB_ENV
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release
- name: Pack
run: dotnet pack WiringXSharp --configuration Release /p:PackageVersion=$VERSION --output nupkgs
- name: Push to NuGet
run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json