Skip to content

Release 3.0.0

Release 3.0.0 #20

Workflow file for this run

name: NuGet Publish
on:
push:
tags:
- '*'
jobs:
nuget-publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Create the package
run: dotnet pack --configuration Release src/KurzSharp
- name: Publish the package
run: |
dotnet nuget push "src/KurzSharp/bin/Release/*.nupkg" --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json
dotnet nuget push "src/KurzSharp/bin/Release/*.nupkg" --skip-duplicate --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/ahmad2smile/index.json