Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 | |
- 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 |