-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (37 loc) · 1.16 KB
/
deploy-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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