From d03f5b9c2bf503a3c1ba534e30cb6797a1e07edf Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 17 Aug 2023 12:19:28 -0400 Subject: [PATCH] Cleanup --- .github/workflows/artifact-tests.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index 3f5a11a9..ed5e0381 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -31,11 +31,6 @@ jobs: with: node-version: 16.x - # In order to upload & download artifacts from a shell script, certain env variables need to be set that are only available in the - # node context. This runs a local action that gets and sets the necessary env variables that are needed - - name: Set env variables - uses: ./packages/artifact/__tests__/ci-test-action/ - # Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible # without these to just compile the artifacts package - name: Install root npm packages @@ -69,6 +64,14 @@ jobs: const fileContents = ['artifact-path/first.txt','artifact-path/second.txt'] - const uploadResult = await artifact.create().uploadArtifact(artifactName, fileContents, '${{ github.workspace }}') + const uploadResult = await artifact.create().uploadArtifact(artifactName, fileContents, './') console.log(uploadResult) + + const success = uploadResult.success + const size = uploadResult.size + const id = uploadResult.id + + if (!success) { + throw new Error('Failed to upload artifact') + }