From bf27954329ce554c044d082350f1a4e0f628af52 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 15 Jul 2024 17:27:04 -0400 Subject: [PATCH 01/12] Revert "Removed unused code" This reverts commit df710a5603dbf2d43b8991e2b0ba8e892b59f1ef. --- .../Tgstation.Server.ReleaseNotes/Program.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tools/Tgstation.Server.ReleaseNotes/Program.cs b/tools/Tgstation.Server.ReleaseNotes/Program.cs index b74af3b701..d2c7c67ae5 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Program.cs +++ b/tools/Tgstation.Server.ReleaseNotes/Program.cs @@ -61,6 +61,7 @@ namespace Tgstation.Server.ReleaseNotes var fullNotes = versionString.Equals("--generate-full-notes", StringComparison.OrdinalIgnoreCase); var nuget = versionString.Equals("--nuget", StringComparison.OrdinalIgnoreCase); var ciCompletionCheck = versionString.Equals("--ci-completion-check", StringComparison.OrdinalIgnoreCase); + var genToken = versionString.Equals("--token-output-file", StringComparison.OrdinalIgnoreCase); if ((!Version.TryParse(versionString, out var version) || version.Revision != -1) && !ensureRelease @@ -68,7 +69,8 @@ namespace Tgstation.Server.ReleaseNotes && !shaCheck && !fullNotes && !nuget - && !ciCompletionCheck) + && !ciCompletionCheck + && !genToken) { Console.WriteLine("Invalid version: " + versionString); return 2; @@ -150,6 +152,22 @@ namespace Tgstation.Server.ReleaseNotes return await CICompletionCheck(client, args[1], args[2]); } + + if (genToken) + { + if (args.Length < 3) + { + Console.WriteLine("Missing output file path or PEM Base64 for app authentication!"); + return 33847; + } + + await GenerateAppCredentials(client, args[2]); + + var token = client.Credentials.GetToken(); + await File.WriteAllTextAsync(args[1], token); + return 0; + } + if (shaCheck) { if(args.Length < 2) From 57aa34ee6882b6118eca4d21da0f4abfcd84982a Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 15 Jul 2024 17:34:01 -0400 Subject: [PATCH 02/12] Stable merge using GitHub App --- .github/workflows/stable-merge.yml | 35 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stable-merge.yml b/.github/workflows/stable-merge.yml index 05299e6284..6df3e94631 100644 --- a/.github/workflows/stable-merge.yml +++ b/.github/workflows/stable-merge.yml @@ -6,18 +6,41 @@ on: - master workflow_dispatch: -env: - DEV_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} - jobs: master-merge: + name: Master Merge runs-on: ubuntu-latest steps: - - name: Checkout + - name: Build Checkout + uses: actions/checkout@v4 + with: + path: temp_workspace + + - name: Restore + run: | + cd temp_workspace + dotnet restore + + - name: Build ReleaseNotes + run: | + cd temp_workspace + dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: Run ReleaseNotes Create CI Completion Check + run: | + cd temp_workspace + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + + - name: Load Installation Token into Envvar + run: | + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + + - name: Main Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.DEV_PUSH_TOKEN }} + token: ${{ env.INSTALLATION_TOKEN }} - name: Merge master into dev uses: robotology/gh-action-nightly-merge@14b4a4cf358f7479aa708bee05cf8a794d6a2516 #v1.5.0 @@ -28,6 +51,6 @@ jobs: allow_forks: true user_name: tgstation-server user_email: tgstation-server@users.noreply.github.com - push_token: DEV_PUSH_TOKEN + push_token: INSTALLATION_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4bc6b2ec82c73ae688ab1f27c251a5dfae501dfe Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 20:35:34 -0400 Subject: [PATCH 03/12] Reorganize projects so that building ReleaseNotes is quicker --- build/NewtonsoftJson.props | 6 ++++ .../Tgstation.Server.Api.csproj | 3 +- .../Tgstation.Server.Client.csproj | 3 +- .../Components/Interop/DMApiConstants.cs | 1 + src/Tgstation.Server.Host/Core/Application.cs | 2 +- .../Setup/SetupWizard.cs | 7 ++-- .../Swarm/SwarmConstants.cs | 1 + .../Tgstation.Server.Host.csproj | 7 ++-- .../Tgstation.Server.Shared.csproj | 23 +++++++++++++ .../VersionConverter.cs | 10 +++--- .../TestVersionConverter.cs | 7 ++-- .../Tgstation.Server.Shared.Tests.csproj | 12 +++++++ tgstation-server.sln | 32 ++++++++++++++++++- .../Tgstation.Server.ReleaseNotes/Program.cs | 2 +- .../Tgstation.Server.ReleaseNotes.csproj | 2 +- 15 files changed, 94 insertions(+), 24 deletions(-) create mode 100644 build/NewtonsoftJson.props create mode 100644 src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj rename src/{Tgstation.Server.Host/Extensions/Converters => Tgstation.Server.Shared}/VersionConverter.cs (90%) rename tests/{Tgstation.Server.Host.Tests/Extensions/Converters => Tgstation.Server.Shared.Tests}/TestVersionConverter.cs (85%) create mode 100644 tests/Tgstation.Server.Shared.Tests/Tgstation.Server.Shared.Tests.csproj diff --git a/build/NewtonsoftJson.props b/build/NewtonsoftJson.props new file mode 100644 index 0000000000..da775538fb --- /dev/null +++ b/build/NewtonsoftJson.props @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index a9a49e05e1..2e8dc1c4e5 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -1,5 +1,6 @@ + $(TgsNugetNetFramework) @@ -28,8 +29,6 @@ - - diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index ef5a83c7a3..d76561899c 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -18,7 +18,8 @@ - + + diff --git a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs index 7386e85669..edaf3e408e 100644 --- a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs +++ b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs @@ -5,6 +5,7 @@ using Newtonsoft.Json.Serialization; using Tgstation.Server.Host.Extensions.Converters; using Tgstation.Server.Host.Properties; +using Tgstation.Server.Shared; namespace Tgstation.Server.Host.Components.Interop { diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 9569d2510b..36970000c5 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -50,7 +50,6 @@ using Tgstation.Server.Host.Controllers; using Tgstation.Server.Host.Controllers.Results; using Tgstation.Server.Host.Database; using Tgstation.Server.Host.Extensions; -using Tgstation.Server.Host.Extensions.Converters; using Tgstation.Server.Host.IO; using Tgstation.Server.Host.Jobs; using Tgstation.Server.Host.Properties; @@ -61,6 +60,7 @@ using Tgstation.Server.Host.Swarm; using Tgstation.Server.Host.System; using Tgstation.Server.Host.Transfer; using Tgstation.Server.Host.Utils; +using Tgstation.Server.Shared; namespace Tgstation.Server.Host.Core { diff --git a/src/Tgstation.Server.Host/Setup/SetupWizard.cs b/src/Tgstation.Server.Host/Setup/SetupWizard.cs index c8007f16b5..04cc54a3bf 100644 --- a/src/Tgstation.Server.Host/Setup/SetupWizard.cs +++ b/src/Tgstation.Server.Host/Setup/SetupWizard.cs @@ -23,11 +23,11 @@ using Npgsql; using Tgstation.Server.Common; using Tgstation.Server.Host.Configuration; using Tgstation.Server.Host.Database; -using Tgstation.Server.Host.Extensions.Converters; using Tgstation.Server.Host.IO; using Tgstation.Server.Host.Properties; using Tgstation.Server.Host.System; using Tgstation.Server.Host.Utils; +using Tgstation.Server.Shared; using YamlDotNet.Serialization; @@ -986,14 +986,15 @@ namespace Tgstation.Server.Host.Setup { SwarmConfiguration.Section, swarmConfiguration }, }; + var versionConverter = new VersionConverter(); var builder = new SerializerBuilder() - .WithTypeConverter(new VersionConverter()); + .WithTypeConverter(versionConverter); if (userConfigFileName.EndsWith(".json", StringComparison.OrdinalIgnoreCase)) builder.JsonCompatible(); var serializer = new SerializerBuilder() - .WithTypeConverter(new VersionConverter()) + .WithTypeConverter(versionConverter) .Build(); var serializedYaml = serializer.Serialize(map); diff --git a/src/Tgstation.Server.Host/Swarm/SwarmConstants.cs b/src/Tgstation.Server.Host/Swarm/SwarmConstants.cs index 988c60243e..834b6718cf 100644 --- a/src/Tgstation.Server.Host/Swarm/SwarmConstants.cs +++ b/src/Tgstation.Server.Host/Swarm/SwarmConstants.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Serialization; using Tgstation.Server.Api; using Tgstation.Server.Host.Extensions.Converters; +using Tgstation.Server.Shared; namespace Tgstation.Server.Host.Swarm { diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 9c5dbd6fef..de23f6f7d8 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -1,4 +1,4 @@ - + @@ -77,8 +77,6 @@ - - @@ -102,8 +100,6 @@ - - @@ -135,6 +131,7 @@ + diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj new file mode 100644 index 0000000000..57442b94dc --- /dev/null +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -0,0 +1,23 @@ + + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + diff --git a/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs b/src/Tgstation.Server.Shared/VersionConverter.cs similarity index 90% rename from src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs rename to src/Tgstation.Server.Shared/VersionConverter.cs index 48c593d72f..b9766210e3 100644 --- a/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs +++ b/src/Tgstation.Server.Shared/VersionConverter.cs @@ -1,6 +1,4 @@ -using System; - -using Newtonsoft.Json; +using Newtonsoft.Json; using Tgstation.Server.Common.Extensions; @@ -8,7 +6,7 @@ using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; -namespace Tgstation.Server.Host.Extensions.Converters +namespace Tgstation.Server.Shared { /// /// and for serializing s in semver format. @@ -85,10 +83,10 @@ namespace Tgstation.Server.Host.Extensions.Converters public bool Accepts(Type type) => CheckSupportsType(type, false); /// - public object ReadYaml(IParser parser, Type type) => throw new NotSupportedException("Deserialization not supported!"); // The default implementation is fine at handling this + public object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotSupportedException("Deserialization not supported!"); // The default implementation is fine at handling this /// - public void WriteYaml(IEmitter? emitter, object? value, Type type) + public void WriteYaml(IEmitter? emitter, object? value, Type type, ObjectSerializer serializer) { ArgumentNullException.ThrowIfNull(emitter); diff --git a/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs b/tests/Tgstation.Server.Shared.Tests/TestVersionConverter.cs similarity index 85% rename from tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs rename to tests/Tgstation.Server.Shared.Tests/TestVersionConverter.cs index deb2fc1760..c5f8e26a37 100644 --- a/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs +++ b/tests/Tgstation.Server.Shared.Tests/TestVersionConverter.cs @@ -1,11 +1,12 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; +using System; + +using Microsoft.VisualStudio.TestTools.UnitTesting; using Tgstation.Server.Common.Extensions; using YamlDotNet.Serialization; -namespace Tgstation.Server.Host.Extensions.Converters.Tests +namespace Tgstation.Server.Shared.Tests { [TestClass] public sealed class TestVersionConverter diff --git a/tests/Tgstation.Server.Shared.Tests/Tgstation.Server.Shared.Tests.csproj b/tests/Tgstation.Server.Shared.Tests/Tgstation.Server.Shared.Tests.csproj new file mode 100644 index 0000000000..a10b4c149e --- /dev/null +++ b/tests/Tgstation.Server.Shared.Tests/Tgstation.Server.Shared.Tests.csproj @@ -0,0 +1,12 @@ + + + + + $(TgsFrameworkVersion) + + + + + + + diff --git a/tgstation-server.sln b/tgstation-server.sln index a8b1f999bf..81bcb0fb81 100644 --- a/tgstation-server.sln +++ b/tgstation-server.sln @@ -29,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6 build\Dockerfile = build\Dockerfile build\GenerateMigrations.sh = build\GenerateMigrations.sh build\logo.svg = build\logo.svg + build\NewtonsoftJson.props = build\NewtonsoftJson.props build\NugetCommon.props = build\NugetCommon.props build\OpenApiValidationSettings.json = build\OpenApiValidationSettings.json build\SrcCommon.props = build\SrcCommon.props @@ -261,7 +262,11 @@ Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Tgstation.Server.Host.Servi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.ReleaseNotes", "tools\Tgstation.Server.ReleaseNotes\Tgstation.Server.ReleaseNotes.csproj", "{69944039-65C2-40E1-9D86-0608FA0C2D70}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.LogoGenerator", "tools\Tgstation.Server.LogoGenerator\Tgstation.Server.LogoGenerator.csproj", "{7F7FCFDF-271D-45C2-830C-BCCB19C57077}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.LogoGenerator", "tools\Tgstation.Server.LogoGenerator\Tgstation.Server.LogoGenerator.csproj", "{7F7FCFDF-271D-45C2-830C-BCCB19C57077}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Shared", "src\Tgstation.Server.Shared\Tgstation.Server.Shared.csproj", "{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Shared.Tests", "tests\Tgstation.Server.Shared.Tests\Tgstation.Server.Shared.Tests.csproj", "{EAB84FD0-5514-4254-B188-7D90ACB7284D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -533,6 +538,30 @@ Global {7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU {7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU {7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWindows|Any CPU.ActiveCfg = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWindows|Any CPU.Build.0 = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWix|Any CPU.ActiveCfg = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWix|Any CPU.Build.0 = Debug|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Release|Any CPU.Build.0 = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWindows|Any CPU.ActiveCfg = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU + {74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWindows|Any CPU.ActiveCfg = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWindows|Any CPU.Build.0 = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWix|Any CPU.ActiveCfg = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWix|Any CPU.Build.0 = Debug|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.Release|Any CPU.Build.0 = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWindows|Any CPU.ActiveCfg = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU + {EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -571,6 +600,7 @@ Global {9E66C6F1-E235-4979-83B5-C2B3FDAD6E01} = {506B9092-AF88-4DA2-84FD-C11646B695B0} {69944039-65C2-40E1-9D86-0608FA0C2D70} = {A55C1117-5808-4AB2-BEA6-4D4A3E66A2F2} {7F7FCFDF-271D-45C2-830C-BCCB19C57077} = {A55C1117-5808-4AB2-BEA6-4D4A3E66A2F2} + {EAB84FD0-5514-4254-B188-7D90ACB7284D} = {316141B0-CD21-4769-A013-D53DA9B9EC09} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DFD36C95-3E49-41C7-ACDB-86BAF5B18A79} diff --git a/tools/Tgstation.Server.ReleaseNotes/Program.cs b/tools/Tgstation.Server.ReleaseNotes/Program.cs index 388eafe6cb..d65432f591 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Program.cs +++ b/tools/Tgstation.Server.ReleaseNotes/Program.cs @@ -25,7 +25,7 @@ using Newtonsoft.Json; using Octokit; using Octokit.GraphQL; -using Tgstation.Server.Host.Extensions.Converters; +using Tgstation.Server.Shared; using YamlDotNet.Serialization; diff --git a/tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj b/tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj index 4c87963970..772bc7c717 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj +++ b/tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj @@ -12,7 +12,7 @@ - + From 37460cca63b263b8ab0aad945ea41e0b0ccf6830 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 20:44:44 -0400 Subject: [PATCH 04/12] Cleanup how app token is generated --- .github/workflows/stable-merge.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/stable-merge.yml b/.github/workflows/stable-merge.yml index 6df3e94631..11f6cda41f 100644 --- a/.github/workflows/stable-merge.yml +++ b/.github/workflows/stable-merge.yml @@ -26,13 +26,10 @@ jobs: cd temp_workspace dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - - name: Run ReleaseNotes Create CI Completion Check + - name: Generate App Token run: | cd temp_workspace dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} - - - name: Load Installation Token into Envvar - run: | echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV rm ${{ runner.temp }}/installation_secret.txt From a36d9b64520df6f607bc01d8b9d2f5dc7acb6096 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 20:45:04 -0400 Subject: [PATCH 05/12] Use app token for changelogs --- .github/workflows/ci-pipeline.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 0a6e1929dc..82d9ad2abf 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -315,6 +315,12 @@ jobs: mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes + - name: Generate App Token + run: | + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + - name: Patch Doxyfile run: | VERSION=$(cat "build/Version.props" | grep -oPm1 "(?<=)[^<]+") @@ -347,7 +353,7 @@ jobs: echo "Committing..." git diff-index --quiet HEAD || git commit -m "Deploy code docs to GitHub Pages for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}" echo "Pushing..." - git push -f "https://${{ secrets.DEV_PUSH_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 + git push -f "https://${{ env.INSTALLATION_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 docker-build: name: Build Docker Image @@ -1880,6 +1886,12 @@ jobs: mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes + - name: Generate App Token + run: | + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + - name: gh-pages Push run: | pushd $HOME/tgsdox @@ -1894,7 +1906,7 @@ jobs: echo "Committing..." git diff-index --quiet HEAD || git commit -m "Regenerate changelog post deploy for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}" echo "Pushing..." - git push -f "https://${{ secrets.DEV_PUSH_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 + git push -f "https://${{ env.INSTALLATION_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 deploy-docker: name: Deploy TGS (Docker) From 9b03e2624f8045e1b9669bf9ac53bbe1d6c0b4f1 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:26:03 -0400 Subject: [PATCH 06/12] Replace `DEV_PUSH_TOKEN` with App where possible Update docs --- .github/CONTRIBUTING.md | 3 +- .github/workflows/ci-pipeline.yml | 49 +++++++++++++------ .../Tgstation.Server.ReleaseNotes/Program.cs | 10 ++++ 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2935d961a7..233c7fb51e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -73,7 +73,8 @@ For the full CI gambit, the following repository configuration must be set: If you don't plan on deploying TGS, the following secrets can be omitted: -- Secret `DEV_PUSH_TOKEN`: A GitHub token with read/write access to the repository. Enables doxygen pushes to `gh-pages` branch, and releases creation. +- Secret `DEV_PUSH_TOKEN`: A repo scoped GitHub PAT with read/write access on the repository and the ability to trigger workflows on https://github.com/tgstation/tgstation-ppa. Used to trigger debian repo rebuilds, bypass rate limits, update milestones, and create winget package acceptance PRs. +- Secret `TGS_CI_GITHUB_APP_TOKEN_BASE64` is a base 64 encoded private key for a GitHub App. This app must be installed on the repo and have read/write access to checks and contents. Used to generate CI checks, push changelogs, and create releases. - Secret `DOCKER_USERNAME`: Login username for Docker image push. - Secret `DOCKER_PASSWORD`: Login password for Docker image push. - Secret `NUGET_API_KEY`: Nuget.org API Key for client libraries push. diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 82d9ad2abf..117edb9ab9 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -42,7 +42,6 @@ env: TGS_DOTNET_QUALITY: ga TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }} TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} - WINGET_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} PACKAGING_PRIVATE_KEY_PASSPHRASE: ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -1486,11 +1485,17 @@ jobs: - name: Generate Release Notes run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_API_VERSION }} --httpapi + - name: Generate App Token + run: | + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + - name: Create GitHub Release uses: actions/create-release@v1 id: create_release env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: tag_name: api-v${{ env.TGS_API_VERSION }} release_name: tgstation-server API v${{ env.TGS_API_VERSION }} @@ -1500,7 +1505,7 @@ jobs: - name: Upload OpenApi Spec uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./swagger/tgs_api.json @@ -1549,11 +1554,17 @@ jobs: - name: Generate Release Notes run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_DM_VERSION }} --dmapi + - name: Generate App Token + run: | + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + - name: Create GitHub Release uses: actions/create-release@v1 id: create_release env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: tag_name: dmapi-v${{ env.TGS_DM_VERSION }} release_name: tgstation-server DMAPI v${{ env.TGS_DM_VERSION }} @@ -1563,7 +1574,7 @@ jobs: - name: Upload DMAPI Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./DMAPI.zip @@ -1643,7 +1654,7 @@ jobs: run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Run ReleaseNotes with --ensure-release - run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --ensure-release + run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --ensure-release ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} deploy-tgs: name: Deploy TGS @@ -1766,11 +1777,17 @@ jobs: - name: Generate Release Notes run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes ${{ env.TGS_VERSION }} + - name: Generate App Token + run: | + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} + echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV + rm ${{ runner.temp }}/installation_secret.txt + - name: Create GitHub Release uses: actions/create-release@v1 id: create_release env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: tag_name: tgstation-server-v${{ env.TGS_VERSION }} release_name: tgstation-server-v${{ env.TGS_VERSION }} @@ -1780,7 +1797,7 @@ jobs: - name: Upload Server Console Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ServerConsole.zip @@ -1790,7 +1807,7 @@ jobs: - name: Upload Server Service Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ServerService.zip @@ -1800,7 +1817,7 @@ jobs: - name: Upload DMAPI Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./DMAPI.zip @@ -1810,7 +1827,7 @@ jobs: - name: Upload OpenApi Spec Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./swagger/tgs_api.json @@ -1820,7 +1837,7 @@ jobs: - name: Upload Server Update Package Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ServerUpdatePackage.zip @@ -1830,7 +1847,7 @@ jobs: - name: Upload Debian Pacakaging Artifact uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./packaging-debian/tgstation-server-v${{ env.TGS_VERSION }}.debian.packaging.tar.xz @@ -1840,7 +1857,7 @@ jobs: - name: Upload MariaDB .msi uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle/bin/Release/mariadb.msi @@ -1850,7 +1867,7 @@ jobs: - name: Upload Installer .exe uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ env.INSTALLATION_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./build/package/winget/tgstation-server-installer.exe @@ -1966,7 +1983,7 @@ jobs: - name: Install winget uses: Cyberboss/install-winget@v1 with: - GITHUB_TOKEN: ${{ env.WINGET_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} - name: Install wingetcreate run: winget install wingetcreate --version 1.2.8.0 --disable-interactivity --accept-source-agreements # Pinned due to breaking every other version diff --git a/tools/Tgstation.Server.ReleaseNotes/Program.cs b/tools/Tgstation.Server.ReleaseNotes/Program.cs index d65432f591..26b6c55392 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Program.cs +++ b/tools/Tgstation.Server.ReleaseNotes/Program.cs @@ -128,7 +128,17 @@ namespace Tgstation.Server.ReleaseNotes try { if (ensureRelease) + { + if (args.Length < 2) + { + Console.WriteLine("Missing PEM Base64 for updating release!"); + return 454233; + } + + await GenerateAppCredentials(client, args[1]); + return await EnsureRelease(client); + } if (linkWinget) { From c165fc7c1aaa45429d7145447601697e2df59ba0 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:28:54 -0400 Subject: [PATCH 07/12] Changelogs and stable merge now generated by app --- .github/workflows/ci-pipeline.yml | 8 ++++---- .github/workflows/stable-merge.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 117edb9ab9..c0f2126523 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -340,8 +340,8 @@ jobs: echo ./doxout/* | xargs -n 10 sudo mv -t $HOME/tgsdox cd $HOME/tgsdox git config --global push.default simple - git config user.name "tgstation-server" - git config user.email "tgstation-server@tgstation13.org" + git config user.name "tgstation-server-ci[bot]" + git config user.email "847638+tgstation-server-ci[bot]@users.noreply.github.com" echo '# THIS BRANCH IS AUTO GENERATED BY GITHUB ACTIONS' > README.md # Need to create a .nojekyll file to allow filenames starting with an underscore @@ -1917,8 +1917,8 @@ jobs: sudo mv changelog.yml $HOME/tgsdox/ cd $HOME/tgsdox git config --global push.default simple - git config user.name "tgstation-server" - git config user.email "tgstation-server@tgstation13.org" + git config user.name "tgstation-server-ci[bot]" + git config user.email "847638+tgstation-server-ci[bot]@users.noreply.github.com" git add changelog.yml echo "Committing..." git diff-index --quiet HEAD || git commit -m "Regenerate changelog post deploy for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}" diff --git a/.github/workflows/stable-merge.yml b/.github/workflows/stable-merge.yml index 11f6cda41f..becdb02839 100644 --- a/.github/workflows/stable-merge.yml +++ b/.github/workflows/stable-merge.yml @@ -46,8 +46,8 @@ jobs: development_branch: 'dev' allow_ff: true allow_forks: true - user_name: tgstation-server - user_email: tgstation-server@users.noreply.github.com + user_name: tgstation-server-ci[bot] + user_email: 847638+tgstation-server-ci[bot]@users.noreply.github.com push_token: INSTALLATION_TOKEN env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b66a6da53830bc890de2658d414c9ac47a2280ab Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:33:18 -0400 Subject: [PATCH 08/12] Nuget package updates --- build/TestCommon.props | 4 ++-- src/Tgstation.Server.Api/Tgstation.Server.Api.csproj | 2 +- .../Tgstation.Server.Client.csproj | 4 ++-- src/Tgstation.Server.Host/.config/dotnet-tools.json | 2 +- .../Tgstation.Server.Host.csproj | 12 ++++++------ .../Tgstation.Server.Shared.csproj | 4 ++-- .../Tgstation.Server.Host.Tests.csproj | 1 + 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index b7a3d408c0..1864c27e2a 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -18,9 +18,9 @@ - + - + diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 2e8dc1c4e5..b55dff5e5f 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index d76561899c..89c048c68f 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -11,9 +11,9 @@ - + - + diff --git a/src/Tgstation.Server.Host/.config/dotnet-tools.json b/src/Tgstation.Server.Host/.config/dotnet-tools.json index 4bb3f8cae9..af52642792 100644 --- a/src/Tgstation.Server.Host/.config/dotnet-tools.json +++ b/src/Tgstation.Server.Host/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.6", + "version": "8.0.7", "commands": [ "dotnet-ef" ] diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index de23f6f7d8..e29c37faa7 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -78,21 +78,21 @@ - + - + - + - + runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj index 57442b94dc..4b491081dd 100644 --- a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -9,9 +9,9 @@ - + - + diff --git a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj index 50fdb38405..326b6f38b2 100644 --- a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj +++ b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj @@ -6,6 +6,7 @@ + From e3fa319a46fff2e0a192d1fc5f175d1e1dc47921 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:44:44 -0400 Subject: [PATCH 09/12] Switch on nullable references for `Tgstation.Server.Host.Common` --- src/Tgstation.Server.Host.Common/DotnetHelper.cs | 3 +++ .../Tgstation.Server.Host.Common.csproj | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Tgstation.Server.Host.Common/DotnetHelper.cs b/src/Tgstation.Server.Host.Common/DotnetHelper.cs index b5d80db784..5945eac25d 100644 --- a/src/Tgstation.Server.Host.Common/DotnetHelper.cs +++ b/src/Tgstation.Server.Host.Common/DotnetHelper.cs @@ -21,6 +21,9 @@ namespace Tgstation.Server.Host.Common public static IEnumerable GetPotentialDotnetPaths(bool isWindows) { var enviromentPath = Environment.GetEnvironmentVariable("PATH"); + if (enviromentPath == null) + return Enumerable.Empty(); + var paths = enviromentPath.Split(';'); var exeName = "dotnet"; diff --git a/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj b/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj index a45edbc7c4..484d476684 100644 --- a/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj +++ b/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj @@ -4,6 +4,7 @@ $(TgsFrameworkVersion);net2.0 $(TgsCoreVersion) + enable From 8199bfe15233cd5232ebee3b90322bc1961030a9 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:46:05 -0400 Subject: [PATCH 10/12] Fixup `Tgstation.Server.Shared.csproj` --- src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj | 5 +++-- src/Tgstation.Server.Shared/VersionConverter.cs | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj index 4b491081dd..01518a39b0 100644 --- a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -1,9 +1,10 @@ + - net8.0 - enable + $(TgsFrameworkVersion) + $(TgsCoreVersion) enable diff --git a/src/Tgstation.Server.Shared/VersionConverter.cs b/src/Tgstation.Server.Shared/VersionConverter.cs index b9766210e3..ee0a4f3a31 100644 --- a/src/Tgstation.Server.Shared/VersionConverter.cs +++ b/src/Tgstation.Server.Shared/VersionConverter.cs @@ -1,4 +1,6 @@ -using Newtonsoft.Json; +using System; + +using Newtonsoft.Json; using Tgstation.Server.Common.Extensions; From 56de05ccef0f3ba1586a8326e675ce8cd787672a Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Wed, 17 Jul 2024 06:58:54 -0400 Subject: [PATCH 11/12] Fix ambiguous reference weirdness --- src/Tgstation.Server.Api/Models/ErrorCode.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Api/Models/ErrorCode.cs b/src/Tgstation.Server.Api/Models/ErrorCode.cs index b75c837585..7dc134f905 100644 --- a/src/Tgstation.Server.Api/Models/ErrorCode.cs +++ b/src/Tgstation.Server.Api/Models/ErrorCode.cs @@ -1,5 +1,4 @@ -using System; -using System.ComponentModel; +using System.ComponentModel; using Tgstation.Server.Common; @@ -8,7 +7,7 @@ namespace Tgstation.Server.Api.Models /// /// Types of s that the API may return. /// - /// Entries marked with the are no longer in use but kept for placeholders until they can be recycled in the next major API version. + /// Entries marked Obsolete are no longer in use but kept for placeholders until they can be recycled in the next major API version. public enum ErrorCode : uint { /// From 16dd2416b056c8e152bdb77701c648e79a8b0d8c Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Wed, 17 Jul 2024 16:59:37 -0400 Subject: [PATCH 12/12] Fix bad token for Windows installer job --- .github/workflows/ci-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index c0f2126523..5b6741e772 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1238,7 +1238,7 @@ jobs: - name: Install winget uses: Cyberboss/install-winget@v1 with: - GITHUB_TOKEN: ${{ env.WINGET_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} - name: Setup dotnet uses: actions/setup-dotnet@v4