Skip to content

v1.0.0

v1.0.0 #47

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore Neomaster.JsonToLinq/Neomaster.JsonToLinq.csproj
- name: Build project
run: dotnet build Neomaster.JsonToLinq/Neomaster.JsonToLinq.csproj --configuration Release --no-restore
- name: Build and run unit tests
run: |
dotnet build Neomaster.JsonToLinq.UnitTests/Neomaster.JsonToLinq.UnitTests.csproj --configuration Release
dotnet test Neomaster.JsonToLinq.UnitTests/Neomaster.JsonToLinq.UnitTests.csproj --configuration Release --no-build
- name: Pack NuGet package
run: dotnet pack Neomaster.JsonToLinq/Neomaster.JsonToLinq.csproj --configuration Release --no-build --output ./nupkg
- name: Publish package to NuGet.org
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json