diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 52626d34f9..bdbae4f2db 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,9 +17,12 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 7.x.x - + - name: Set up secret file + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo $GITHUB_TOKEN >> secrets.txt - name: Build Installers env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | sed 's/./& /g' RUN_ID: ${{ github.run_id }} run: ./build.ps1 build-installers diff --git a/Build/Program.cs b/Build/Program.cs index e76466bdf3..847f5bc26e 100644 --- a/Build/Program.cs +++ b/Build/Program.cs @@ -107,9 +107,9 @@ IEnumerable GetFiles(string d) BUILD_INSTALLERS, async () => { - var token = Environment.GetEnvironmentVariable("GITHUB_TOKEN"); + var token = File.ReadAllText("secrets.txt"); var runId = Environment.GetEnvironmentVariable("RUN_ID"); - Console.WriteLine($"Found: {runId} and {string.IsNullOrEmpty(token)}"); + Console.WriteLine($"Found: {runId} and {token.Length}"); await Github.BuildInstallers(token, runId).ConfigureAwait(false); } );