Skip to content

Publish Nuget Package #40

Publish Nuget Package

Publish Nuget Package #40

name: Publish Nuget Package
env:
NUGET_PACKAGE_NAME_VERSION: "GmailHelper.1.9.6.nupkg"
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
dotnet-version: [ '3.1.x' ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Dotnet Version (${{ matrix.dotnet-version }})
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Create Package
run: dotnet pack --configuration=Release GmailAPIHelper/GmailAPIHelper.csproj
- name: Publish Nuget Package
run: dotnet nuget push GmailAPIHelper/bin/Release/${{ env.NUGET_PACKAGE_NAME_VERSION }} -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}