28 lines
872 B
YAML
28 lines
872 B
YAML
name: publish-nuget
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
NUGET_API_KEY:
|
|
required: true
|
|
|
|
jobs:
|
|
publish-nuget:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.nuget/packages
|
|
~/.local/share/NuGet/v3-cache
|
|
key: ${{ runner.os }}-v0-nuget-${{ hashFiles('**/*.csproj') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-v0-nuget-
|
|
- name: Build (Release)
|
|
run: dotnet build ${{ github.workspace }}/Build.csproj --configuration=Release --property CI=true
|
|
- name: Publish to NuGet
|
|
run: dotnet nuget push --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source 'https://api.nuget.org/v3/index.json' ${{ github.workspace }}/packages/RabbitMQ.AMQP.Client.*.nupkg
|