Skip to content

Version 3.5.0

Version 3.5.0 #17

Workflow file for this run

name: Publish .NET packages on GitHub and NuGet
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Install .NET environment
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6
# Build DSF
- name: Build DSF packages
run: |
cd src
dotnet restore
dotnet build
# Publish packages
- name: Publish packages
run: |
# Publish to GitHub package registry
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --source "https://nuget.pkg.github.com/Duet3D/index.json" --api-key $GH_API_KEY
# Publish to NuGet package registry
dotnet nuget push src/DuetAPI/bin/Debug/DuetAPI.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
dotnet nuget push src/DuetAPIClient/bin/Debug/DuetAPIClient.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
dotnet nuget push src/DuetHttpClient/bin/Debug/DuetHttpClient.*.nupkg --source "nuget.org" --api-key $NUGET_API_KEY
env:
GH_API_KEY: ${{ secrets.GH_API_KEY }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}