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
defaults:
run:
working-directory: NinjaNye.SearchExtensions
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --verbosity minimal
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-output
path: .
deploy:
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- 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: Log
run: ls -al .
- name: Pack
run: dotnet pack -c Release --no-build --output nuget-packages
- 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
# working-directory: NinjaNye.SearchExtensions