Skip to content

Re-enable pushing built nuget packages #138

Re-enable pushing built nuget packages

Re-enable pushing built nuget packages #138

Workflow file for this run

name: Build & Publish
on:
push:
branches:
- main
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
buildConfiguration: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1
6.x
7.x
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: NUKE'
run: ./build.cmd GitHubBuild --configuration ${{ env.buildConfiguration }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: nuget
path: |
${{ github.workspace }}/artifacts/*.nupkg
${{ github.workspace }}/artifacts/*.snupkg
- name: Push
uses: lethek/os-specific-run@v1.0.6
with:
linux: dotnet nuget push "${{ github.workspace }}/artifacts/*.nupkg" -s ${{ secrets.NUGET_SOURCE }} -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
windows: dotnet nuget push "${{ github.workspace }}\artifacts\*.nupkg" -s ${{ secrets.NUGET_SOURCE }} -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate