Skip to content

Publish to nuget

Publish to nuget #109

Workflow file for this run

name: Publish to nuget
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches: [master]
workflow_run:
workflows: [Build project]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release
# - name: Test
# run: dotnet test --no-build --verbosity normal
- name: Push
run: dotnet nuget push "**/*.nupkg" --source https://nuget.pkg.github.com/DungAT98/index.json --api-key ${GITHUB_TOKEN} --skip-duplicate
env:
GITHUB_TOKEN: ${{ secrets.GH_REGISTRY_TOKEN }}