Skip to content

v2.0.2

v2.0.2 #9

name: Release to NuGet
on:
release:
types: [published]
jobs:
test:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4.0.0
- name: Load Cache 📦
uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache/test
- name: Test 🧪
run: dotnet test --verbosity normal
build-and-publish:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
needs: test
permissions:
packages: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4.0.0
- name: Pack 📦
run: dotnet pack --configuration Release --output .
- name: Add Github to NuGet Source 🔑
run: dotnet nuget add source --username ddjerqq --password ${{ secrets.NUGET_GITHUB_APIKEY }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ddjerqq/index.json"
- name: Push to Github 🚀
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_GITHUB_APIKEY }} --source "github"
- name: Push to NuGet 🚀
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_APIKEY }} --source "https://api.nuget.org/v3/index.json"