From 3973934b3a8f874c0d07155bad25e325baade856 Mon Sep 17 00:00:00 2001 From: Junhao Liao Date: Mon, 30 Dec 2024 22:27:22 -0500 Subject: [PATCH] Upload / Download with a unique artifact name based on the Git SHA. --- .github/workflows/publish-to-npm.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index 6a44e91f..3bd830e0 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -5,6 +5,9 @@ on: types: ["created"] workflow_dispatch: +env: + G_CLP_FFI_JS_DIST_ARTIFACT_NAME: "clp-ffi-js-dist-${{github.sha}}" + permissions: {} jobs: @@ -23,7 +26,7 @@ jobs: - name: "Upload build artifacts" uses: "actions/upload-artifact@v4" with: - name: "dist" + name: "${{env.G_CLP_FFI_JS_DIST_ARTIFACT_NAME}}" path: "dist/" if-no-files-found: "error" retention-days: 1 @@ -35,7 +38,7 @@ jobs: - uses: "actions/checkout@v4" - uses: "actions/download-artifact@v4" with: - name: "dist" + name: "${{env.G_CLP_FFI_JS_DIST_ARTIFACT_NAME}}" path: "dist/" - uses: "actions/setup-node@v4"