diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 00000000000..4661069c396 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -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 diff --git a/Robust.Client/Robust.Client.csproj b/Robust.Client/Robust.Client.csproj index 6ee0278b6c4..7d261635ba7 100644 --- a/Robust.Client/Robust.Client.csproj +++ b/Robust.Client/Robust.Client.csproj @@ -1,7 +1,6 @@  - false true WinExe false @@ -45,7 +44,8 @@ - + + diff --git a/Robust.Server/Robust.Server.csproj b/Robust.Server/Robust.Server.csproj index 21caba7222d..b0edc62efbe 100644 --- a/Robust.Server/Robust.Server.csproj +++ b/Robust.Server/Robust.Server.csproj @@ -1,7 +1,6 @@  - false Exe false ../bin/Server diff --git a/Robust.Shared.Maths/Robust.Shared.Maths.csproj b/Robust.Shared.Maths/Robust.Shared.Maths.csproj index cb73478a39f..3e47425a3b7 100644 --- a/Robust.Shared.Maths/Robust.Shared.Maths.csproj +++ b/Robust.Shared.Maths/Robust.Shared.Maths.csproj @@ -1,7 +1,6 @@  - false false true diff --git a/Robust.Shared.Scripting/Robust.Shared.Scripting.csproj b/Robust.Shared.Scripting/Robust.Shared.Scripting.csproj index e9d3e0ab5ee..793987dbe1d 100644 --- a/Robust.Shared.Scripting/Robust.Shared.Scripting.csproj +++ b/Robust.Shared.Scripting/Robust.Shared.Scripting.csproj @@ -1,7 +1,6 @@ - false false true diff --git a/Robust.Shared/Robust.Shared.csproj b/Robust.Shared/Robust.Shared.csproj index 8750448cb22..8d1ac50f982 100644 --- a/Robust.Shared/Robust.Shared.csproj +++ b/Robust.Shared/Robust.Shared.csproj @@ -1,7 +1,6 @@ - false false true CA1416