Skip to content

NuGet Deployment

NuGet Deployment #44

Workflow file for this run

name: NuGet Deployment
on:
workflow_dispatch:
inputs:
version:
description: 'Plugin version (SemVer: https://semver.org)'
required: true
jobs:
deploy:
name: "NewEssentials Deployment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout Repository
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Install dependencies
run: dotnet restore
- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" NewEssentials/NewEssentials.csproj"
- name: Build
run: dotnet build NewEssentials/ --configuration Release --no-restore
- name: Push to NuGet
run: dotnet nuget push NewEssentials/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json