TMDbLib/.github/workflows/nuget.yml

36 lines
923 B
YAML
Raw Normal View History

name: Nuget push (tag)
on:
push:
tags:
- 'v*'
- '!v*-*'
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# We do not need to fetch tags, as we're already at a tagged build - it should be available automatically
- name: Setup .NET Core 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Pack
run: dotnet pack -c Release -o Build
- name: ls
run: ls -alh Build/
- name: Nuget push (github)
run: dotnet nuget push --no-symbols 1 --skip-duplicate -k ${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" Build/*.nupkg
- name: Nuget push
run: dotnet nuget push --skip-duplicate -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json Build/*.nupkg