Skip to content

refactor: Clean up code formatting in ZaSpanStringBuilderExtensions f… #34

refactor: Clean up code formatting in ZaSpanStringBuilderExtensions f…

refactor: Clean up code formatting in ZaSpanStringBuilderExtensions f… #34

Workflow file for this run

# .github/workflows/ci.yml
name: Publish NuGet
on:
push:
tags: [ 'v*.*.*' ] # push when you create v1.2.3 tag
branches: [ main ] # or build every commit
workflow_dispatch: # manual button
jobs:
build-pack-push:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # REQUIRED for MinVer
- name: Setup .NET (latest stable)
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Restore, build, test
run: |
dotnet restore
dotnet build --configuration Release
dotnet test --configuration Release
- name: Pack (incl. symbols)
run: dotnet pack src/ZaString --configuration Release --include-symbols
# ---------- publish to nuget.org ----------
- name: Push to nuget.org
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet nuget push **/*.nupkg --api-key "${{ secrets.NUGET_API_KEY_ZASTRING }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate