]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ci: download artifacts to release directory (#6612)
authorHugo Roussel <redacted>
Thu, 11 Apr 2024 17:52:21 +0000 (19:52 +0200)
committerGitHub <redacted>
Thu, 11 Apr 2024 17:52:21 +0000 (19:52 +0200)
When action download-artifact was updated to v4, the default download path changed.
This fix binaries not being uploaded to releases.

.github/workflows/build.yml

index f10ed416122d47897ef5c2d1f8ef5c60779f2af6..0527899a1120dc3b5903423118eb436bf129dd24 100644 (file)
@@ -938,6 +938,12 @@ jobs:
       - name: Download artifacts
         id: download-artifact
         uses: actions/download-artifact@v4
+        with:
+          path: ./artifact
+
+      - name: Move artifacts
+        id: move_artifacts
+        run: mkdir -p ./artifact/release && mv ./artifact/*/*.zip ./artifact/release
 
       - name: Create release
         id: create_release
@@ -956,7 +962,7 @@ jobs:
             const path = require('path');
             const fs = require('fs');
             const release_id = '${{ steps.create_release.outputs.id }}';
-            for (let file of await fs.readdirSync('./artifact')) {
+            for (let file of await fs.readdirSync('./artifact/release')) {
               if (path.extname(file) === '.zip') {
                 console.log('uploadReleaseAsset', file);
                 await github.repos.uploadReleaseAsset({
@@ -964,7 +970,7 @@ jobs:
                   repo: context.repo.repo,
                   release_id: release_id,
                   name: file,
-                  data: await fs.readFileSync(`./artifact/${file}`)
+                  data: await fs.readFileSync(`./artifact/release/${file}`)
                 });
               }
             }