From 936b4944046ab965b19436d81c6696da7391b16e Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Mon, 4 Nov 2024 18:53:12 -0700 Subject: [PATCH 1/5] put both files in the same zip --- .github/workflows/emscripten.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 5ef645c..f8a3856 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - name: Setup Emscripten toolchain uses: mymindstorm/setup-emsdk@v14 @@ -33,15 +33,10 @@ jobs: - uses: actions/upload-artifact@v4.3.5 with: - name: 'LegitScriptWasm-${{ github.sha }}.js' - path: '${{github.workspace}}/build/web/LegitScriptWasm.js' + name: 'LegitScriptWasm-${{ github.ref_name }}' + path: '${{github.workspace}}/build/web/LegitScriptWasm.{wasm,js}' overwrite: true - - uses: actions/upload-artifact@v4.3.5 - with: - name: 'LegitScriptWasm-${{ github.sha }}.wasm' - path: '${{github.workspace}}/build/web/LegitScriptWasm.wasm' - overwrite: true - + - name: Test working-directory: ${{github.workspace}}/build # Execute tests defined by the CMake configuration. From d96e50081c370be050ab7cec149532839a2919f2 Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Mon, 4 Nov 2024 18:58:07 -0700 Subject: [PATCH 2/5] ok, that glob didn't work --- .github/workflows/emscripten.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index f8a3856..2a340cb 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -34,7 +34,9 @@ jobs: - uses: actions/upload-artifact@v4.3.5 with: name: 'LegitScriptWasm-${{ github.ref_name }}' - path: '${{github.workspace}}/build/web/LegitScriptWasm.{wasm,js}' + path: | + '${{github.workspace}}/build/web/LegitScriptWasm.wasm' + '${{github.workspace}}/build/web/LegitScriptWasm.js' overwrite: true - name: Test From 80e6df769a147a9e27c8bcb0cf2f0e6485b369c9 Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Mon, 4 Nov 2024 19:03:28 -0700 Subject: [PATCH 3/5] maybe without quotes --- .github/workflows/emscripten.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 2a340cb..1f088db 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -35,8 +35,9 @@ jobs: with: name: 'LegitScriptWasm-${{ github.ref_name }}' path: | - '${{github.workspace}}/build/web/LegitScriptWasm.wasm' - '${{github.workspace}}/build/web/LegitScriptWasm.js' + ${{github.workspace}}/build/web/LegitScriptWasm.wasm + ${{github.workspace}}/build/web/LegitScriptWasm.js + if-no-files-found: error overwrite: true - name: Test From 8fe111cc2ced10c77b05fb764f1f6424fafa8fad Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Mon, 4 Nov 2024 19:07:46 -0700 Subject: [PATCH 4/5] pain --- .github/workflows/emscripten.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 1f088db..0a9ac9c 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/upload-artifact@v4.3.5 with: - name: 'LegitScriptWasm-${{ github.ref_name }}' + name: 'LegitScriptWasm-${{ format('branch-{0}', github.ref_name | replace('/', '-')) }}' path: | ${{github.workspace}}/build/web/LegitScriptWasm.wasm ${{github.workspace}}/build/web/LegitScriptWasm.js From b48f0f80b0e4cb264a81453ec426af76dba26d56 Mon Sep 17 00:00:00 2001 From: Elijah Insua Date: Mon, 4 Nov 2024 19:12:00 -0700 Subject: [PATCH 5/5] use ref but replace slashes --- .github/workflows/emscripten.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 0a9ac9c..4f4d98f 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -31,9 +31,15 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: Store artifact's name + id: artifact-name + env: + REF: ${{ github.ref }} + run: echo "::set-output name=value::${REF////-}-test" + - uses: actions/upload-artifact@v4.3.5 with: - name: 'LegitScriptWasm-${{ format('branch-{0}', github.ref_name | replace('/', '-')) }}' + name: 'LegitScriptWasm-${{ steps.artifact-name.outputs.value }}' path: | ${{github.workspace}}/build/web/LegitScriptWasm.wasm ${{github.workspace}}/build/web/LegitScriptWasm.js