Skip to content

Release to NuGet !

Release to NuGet ! #58

Workflow file for this run

name: Release to NuGet !
on:
release:
types: [published]
workflow_dispatch: # Put here!!
jobs:
build:
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
- name: Pack nugets
run: dotnet pack -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "neumorphism.avalonia.0.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Prep packages
run: dotnet nuget add source --username eviral --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/flarive/index.json"
- name: Publish to GitHub packages
run: dotnet nuget push "neumorphism.avalonia.0.*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate