|
70 | 70 | dotnet-version: 9.0.x |
71 | 71 |
|
72 | 72 | - name: Clone SecretLabDependenciesBuilder |
73 | | - run: git clone https://github.com/Jesus-QC/SecretLabDependenciesBuilder.git |
74 | | - |
75 | | - - name: Patch ServerDownloader.cs to skip prompts |
76 | | - shell: pwsh |
77 | 73 | run: | |
78 | | - @‚ |
79 | | - using DepotDownloader; |
80 | | -
|
81 | | - namespace SecretLabDependenciesBuilder; |
82 | | -
|
83 | | - public static class ServerDownloader |
84 | | - { |
85 | | - private static string _beta; |
86 | | - private static string _betaPassword; |
87 | | -
|
88 | | - public static async Task RunAsync() |
89 | | - { |
90 | | - ConsoleWriter.WriteTitle(); |
91 | | - _beta = Environment.GetEnvironmentVariable("SL_BETA") ?? ""; |
92 | | - _betaPassword = Environment.GetEnvironmentVariable("SL_BETA_PASSWORD") ?? ""; |
93 | | - DirectoryInfo installationDirectory = new(Path.Combine(Environment.CurrentDirectory, "temp")); |
94 | | - installationDirectory.Create(); |
95 | | - string filesPath = Path.Combine(installationDirectory.FullName, "files.txt"); |
96 | | - await File.WriteAllTextAsync(filesPath, "regex:SCPSL_Data/Managed/*"); |
97 | | - List<string> args = [ "-app", "996560", "-filelist", filesPath, "-dir", installationDirectory.FullName ]; |
98 | | - if (!string.IsNullOrEmpty(_beta)) { |
99 | | - args.Add("-beta"); args.Add(_beta); |
100 | | - if (!string.IsNullOrEmpty(_betaPassword)) { |
101 | | - args.Add("-betapassword"); args.Add(_betaPassword); |
102 | | - } |
103 | | - } |
104 | | - bool success = await DepotProgram.Main(args.ToArray()) == 0; |
105 | | - if (!success) { |
106 | | - ConsoleWriter.Write("An error occurred while downloading the files.", ConsoleColor.Red); |
107 | | - return; |
108 | | - } |
109 | | - DirectoryInfo managedDirectory = new(Path.Combine(installationDirectory.FullName, "SCPSL_Data/Managed")); |
110 | | - AssembliesPublicizer.RunPublicizer(managedDirectory); |
111 | | - installationDirectory.Delete(true); |
112 | | - } |
113 | | - } |
114 | | - ‚@ | Set-Content "SecretLabDependenciesBuilder/SecretLabDependenciesBuilder/ServerDownloader.cs" |
| 74 | + git clone https://x-access-token:${{ secrets.MY_PAT }}@github.com/Bill3621/SecretLabDependenciesBuilder.git |
115 | 75 |
|
116 | 76 | - name: Build SecretLabDependenciesBuilder |
117 | 77 | run: | |
|
0 commit comments