summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Roussel <hugo.rous@gmail.com>2024-04-11 19:52:21 +0200
committerGitHub <noreply@github.com>2024-04-11 19:52:21 +0200
commit1bbdaf6ecda6f0a360dfb307b256fcb6838c560b (patch)
tree81952acdc486e99e1cd17fcdb0f6b09a17ee0970
parentf4183afe6a22f356ee222a710686ae7f83dbd949 (diff)
ci: download artifacts to release directory (#6612)
When action download-artifact was updated to v4, the default download path changed. This fix binaries not being uploaded to releases.
-rw-r--r--.github/workflows/build.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f10ed416..0527899a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -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}`)
});
}
}