chore: Update .NET version in CI configuration to 10.0.x #37
This file contains hidden or 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
| # .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: 10.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 |