Skip to content

Workflow file for this run

name: Publish SearchExtensions package to NuGet
on:
push:
branches:
- gha-nuget-test
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Restore dependencies
run: dotnet restore
working-directory: NinjaNye.SearchExtensions
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: NinjaNye.SearchExtensions
- name: Test
run: dotnet test --verbosity minimal
working-directory: NinjaNye.SearchExtensions.Tests
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: build-output
# path: NinjaNye.SearchExtensions/bin/Release
# deploy:
# needs: [build-and-test]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup .NET
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: '8.x'
#
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: build-output
- name: Pack
run: dotnet pack -c Release --no-build --output nuget-packages
working-directory: NinjaNye.SearchExtensions
- name: Log
run: ls -al ./nuget-packages
# - name: Push to NuGet
# run: dotnet nuget push ./nuget-packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate