Skip to content

added --skip-duplicate to CD action #26

added --skip-duplicate to CD action

added --skip-duplicate to CD action #26

name: BackgroundJobs CD
on:
push:
tags:
- backgroundjobs-v*.*.*
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
- name: Restore NuGet packages
run: dotnet restore ./src/Pilgaard.BackgroundJobs/Pilgaard.BackgroundJobs.csproj
- name: Build
run: dotnet build ./src/Pilgaard.BackgroundJobs/Pilgaard.BackgroundJobs.csproj -c Release --no-restore
- name: Package Nugets
run: dotnet pack ./src/Pilgaard.BackgroundJobs/Pilgaard.BackgroundJobs.csproj -c Release --no-build --no-restore --include-source
- name: Push Nugets
run: dotnet nuget push "**/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate