From 170a5852ad522ebc19afa84288e4470b5dd82d3c Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Wed, 23 Oct 2024 21:12:51 +0100 Subject: [PATCH] fix bug --- .github/workflows/generate.yml | 10 +++++++--- generator/JavaScriptReference.cs | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 15acba3..d3b3e89 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -10,7 +10,7 @@ permissions: id-token: write jobs: - cli-reference: + vpkcli: strategy: matrix: os: [macos-latest, windows-latest] @@ -26,15 +26,19 @@ jobs: with: name: cli-${{ matrix.os }} path: generator/refout/* - complete: + generate: runs-on: ubuntu-latest - needs: [cli-reference] steps: - name: Checkout uses: actions/checkout@v4 - name: Generate working-directory: generator run: dotnet run + - uses: caesay/wait-artifact-action@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_wait_seconds: 900 + artifacts: cli-macos-latest,cli-windows-latest - name: Download Artifacts uses: actions/download-artifact@v4 with: diff --git a/generator/JavaScriptReference.cs b/generator/JavaScriptReference.cs index 336bd67..a3a5769 100644 --- a/generator/JavaScriptReference.cs +++ b/generator/JavaScriptReference.cs @@ -8,7 +8,10 @@ public static async Task UpdateJavaScriptReference(string jsReferenceOutput) Directory.CreateDirectory(jsReferenceOutput); var workDir = Path.Combine(AppContext.BaseDirectory, "ref_JS"); - Directory.Delete(workDir, true); + if (Directory.Exists(workDir)) { + Directory.Delete(workDir, true); + } + Directory.CreateDirectory(workDir); await Util.StartShellProcess("npm", ["pack", "velopack"], workDir);