Skip to content

Commit

Permalink
don't use env file
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed May 14, 2024
1 parent aa08e41 commit 29734f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,5 @@ jobs:
with:
dotnet-version: 7.x.x

- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_TOKEN: ${{ secrets.ADAM_BUILD_TOKEN }}
- name: Build Installers
env:
RUN_ID: ${{ github.run_id }}
run: ./build.ps1 build-installers
run: ./build.ps1 build-installers ${{ secrets.ADAM_BUILD_TOKEN }} ${{ github.run_id }}
18 changes: 11 additions & 7 deletions Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using Build;
using GlobExpressions;
using static Bullseye.Targets;
Expand All @@ -15,6 +16,14 @@
const string ZIP = "zip";
const string BUILD_INSTALLERS = "build-installers";

var arguments = new List<string>();
if (args.Length > 1)
{
arguments = args.ToList();
args = new[] { arguments.First() };
arguments = arguments.Skip(1).ToList();
}

Target(
CLEAN,
ForEach("**/output"),
Expand Down Expand Up @@ -107,13 +116,8 @@ IEnumerable<string> GetFiles(string d)
BUILD_INSTALLERS,
async () =>
{
var data = EnvFile.Parse(".env");
var token = data["TOKEN"];
var runId = Environment.GetEnvironmentVariable("RUN_ID");
if (runId is null)
{
throw new InvalidOperationException();
}
var token = arguments.First();
var runId = arguments.Skip(1).First();
await Github.BuildInstallers(token, runId).ConfigureAwait(false);
}
);
Expand Down

0 comments on commit 29734f5

Please sign in to comment.