Skip to content

Deploy Main

Deploy Main #5

Workflow file for this run

name: Deploy Main
on:
workflow_dispatch:
inputs:
publish:
description: 'Publish to NuGet'
default: true
type: boolean
env:
NETCORE_VERSION: |
6.0.x
8.0.x
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}
jobs:
deploy:
name: Publish NuGet Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core ${{ env.NETCORE_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
- name: Restore
run: dotnet restore
- name: Run Tests
run: dotnet test -c Release --no-restore
- name: Pack Phetch.Core
run: dotnet pack -v normal -c Release -o nupkg --no-restore src/Phetch.Core/
- name: Pack Phetch.Blazor
run: dotnet pack -v normal -c Release -o nupkg --no-restore src/Phetch.Blazor/
- name: Push to NuGet Feed
if: github.event.inputs.publish == 'true'
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --api-key $NUGET_KEY --skip-duplicate