Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Publish nupkgs to NuGet feed/package repository

on:
push:
tags:
- 'v*'

jobs:
build-and-publish:
environment: dotnet
permissions:
id-token: write

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7.0.0
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v6.0.0
with:
dotnet-version: 10.0.x

- name: Install dependencies
run: dotnet restore

- name: Build packages
run: dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg

- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: "${{ vars.NUGET_USERNAME }}"

- name: Push NuGet packages
run: |
for pkg in $(find . -name '*.nupkg'); do
case "$pkg" in
${{ vars.EXCLUDE_NUGET_PACKAGES }})
echo "Skipping $pkg"
continue
;;
esac

dotnet nuget push "$pkg" \
--api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate
done

- name: Push symbol packages
run: |
for pkg in $(find . -name '*.snupkg'); do
case "$pkg" in
${{ vars.EXCLUDE_NUGET_PACKAGES }})
echo "Skipping $pkg"
continue
;;
esac

dotnet nuget push "$pkg" \
--api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate
done
4 changes: 2 additions & 2 deletions Robust.Client/Robust.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>WinExe</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Expand Down Expand Up @@ -45,7 +44,8 @@
<ProjectReference Include="..\Robust.Shared.Scripting\Robust.Shared.Scripting.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />
<!--Not actually used yet, and has a conflicting namespace, disabled until more work is done-->
<!--<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" />-->
<ProjectReference Include="..\Lidgren.Network\Lidgren.Network.csproj" />
<ProjectReference Include="..\NetSerializer\NetSerializer\NetSerializer.csproj" />
<ProjectReference Include="..\Robust.LoaderApi\Robust.LoaderApi\Robust.LoaderApi.csproj" />
Expand Down
1 change: 0 additions & 1 deletion Robust.Server/Robust.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>../bin/Server</OutputPath>
Expand Down
1 change: 0 additions & 1 deletion Robust.Shared.Maths/Robust.Shared.Maths.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion Robust.Shared.Scripting/Robust.Shared.Scripting.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion Robust.Shared/Robust.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>CA1416</NoWarn>
Expand Down
Loading