-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (30 loc) · 1.05 KB
/
publish.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
# This workflow
# + downloads built NuGet packages from the artifacts,
# + publishes them to a specified NuGet feed.
#
# This workflow must be called from other workflows.
name: Publish artifact
on:
workflow_call:
inputs:
target:
description: 'Define the target feed to push the artifact (e.g. nuget.org).'
required: true
type: string
jobs:
nuget-org-publish:
if: inputs.target == 'nuget.org'
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Download nugets from artifacts
uses: actions/download-artifact@v4
with:
name: packages
path: package_output
- name: Push to nuget.org
# Publish all packages in "package_output". Skip if already published. Don't upload symbol packages. Get API key from secret "NUGET_FEED_PAT".
run: dotnet nuget push package_output/*.nupkg --skip-duplicate --no-symbols --api-key ${{ secrets.NUGET_FEED_PAT }} --source https://api.nuget.org/v3/index.json